--test-shard
以 <index>/<total>
格式执行的测试套件分片,其中
¥Test suite shard to execute in a format of <index>/<total>
, where
index
是一个正整数,划分部分的索引 total
是一个正整数,划分部分的总数 该命令将所有测试文件划分为 total
个相等的部分,并且仅运行那些恰好位于 index
部分的文件。
¥index
is a positive integer, index of divided parts
total
is a positive integer, total of divided part
This command will divide all tests files into total
equal parts,
and will run only those that happen to be in an index
part.
例如,要将测试套件分为三个部分,请使用:
¥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