Repository navigation
Conversation
domidex01
force-pushed
the
issue/test-runner
branch
from
August 25, 2026 16:28
2b9fd67 to
944ee3d
Compare
npm test was a && chain of 105 npm run links: a fresh npm per file, strictly serial, dead at the first failure, and a hand-edit in two places for every new test. On Windows it died at link 15 and the other ninety never ran. scripts/test.js discovers test/*.js, runs the files in parallel (they all use listen(0) and mkdtemp, so they don't collide), prints every failure rather than the first, and exits non-zero if any failed. *.test.js files go through node --test, thumbs.js through electron, everything else through plain node. Arguments filter by filename substring; --jobs=N caps the workers. Discovery also picks up doc-defaults.js, a test that existed but had never been added to the chain. The per-file npm scripts remain for running one test at a time.
domidex01
force-pushed
the
issue/test-runner
branch
from
August 25, 2026 17:45
944ee3d to
0b0a0f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
npm testwas a single&&chain of 105npm runlinks — a six-thousand-character line. It spawned a fresh npm per file, ran strictly serially, and short-circuited at the first failure: on Windows it dies at link 15 (test:popoverdropdown) and the other ninety tests never run at all. Adding a test file meant hand-editing that line in addition to adding the per-file script — and at least one test (test/doc-defaults.js) existed but had never been added to the chain, so the gate silently never ran it.The change
A small
scripts/test.jsthat:test/*.js, so a new test file is in the gate the moment it exists —doc-defaults.jsis now running (and passing);--jobs=N, default min(8, cores)) — safe because every test useslisten(0)andmkdtemp, verified by comparing parallel results against isolated serial runs;*.test.jsthroughnode --test,thumbs.jsthrough electron, and everything else through plain node (with--disable-warning=MODULE_TYPELESS_PACKAGE_JSON, which two scripts already used);node scripts/test.js focus color).The 105 per-file
test:*scripts stay for running one test at a time.Numbers
Full suite on Windows: 45 seconds wall-clock, 110 files, 100 passed, 10 failed — where the old chain died at file 15 and reported one failure. The 10 failures are pre-existing: each fails identically when run alone, serially (
code-search,field-focus,git-snapshot,git-branches,panel-field,popover-dropdown,preview-worktree,starter,section-dot,vars-row-height). The chain was hiding all but the first of them.