test: fix visibility-state-spec.ts flaky test (#44199)
* test: refactor visibility-state-spec Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * ci: shard tests Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * test: update split-tests for use on Windows Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * test: run visibility-state-spec.ts first Co-Authored-By: John Kleinschmidt <jkleinsc@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
7887395e92
commit
f269ca1d93
6 changed files with 76 additions and 56 deletions
|
@ -1,6 +1,7 @@
|
|||
const glob = require('glob');
|
||||
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const currentShard = parseInt(process.argv[2], 10);
|
||||
const shardCount = parseInt(process.argv[3], 10);
|
||||
|
@ -25,7 +26,7 @@ specFiles.sort((a, b) => {
|
|||
|
||||
let shard = 0;
|
||||
for (const specFile of specFiles) {
|
||||
buckets[shard].push(specFile);
|
||||
buckets[shard].push(path.normalize(specFile));
|
||||
shard++;
|
||||
if (shard === shardCount) shard = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue