--test-shard
要执行的测试套件分片,格式为 <index>/<total>,其中
🌐 Test suite shard to execute in a format of <index>/<total>, where
index 是一个正整数,表示分割部分的索引
total 是一个正整数,表示分割部分的总数
此命令会将所有测试文件分成 total 个相等的部分,
并且只运行那些正好位于第 index 部分的文件。
例如,要将测试套件分为三个部分,请使用:
🌐 For example, to split your tests suite into three parts, use this:
node --test --test-shard=1/3
node --test --test-shard=2/3
node --test --test-shard=3/3