Repository navigation
test: accept the current V8 error wording and run CI on Node 18-24 - #3484
Open
seebaermichi wants to merge 2 commits into
Open
seebaermichi wants to merge 2 commits into
seebaermichi wants to merge 2 commits into
Conversation
added 2 commits
November 10, 2026 16:52
…tions Node 16+ (V8 9.x) reports "Cannot read properties of null (reading 'length')" instead of "Cannot read property 'length' of null", so both assertions failed on every supported Node. Each now accepts the old and the new wording.
Node 10, 12 and 14 are long past end of life. Bump actions/checkout and actions/setup-node to v4 in every job.
|
There is no change log for this pull request yet. |
Author
|
Two notes for merging:
|
This branch has not been deployed
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.
yarn teston master fails 2 of 650 tests on Node 20, 22 and 24. Both failures are inpackages/pug/test/error.reporting.test.js(the "runtime errors › in a mixin" and "› in a layout" cases), and both are test-only: Pug reports the filename, line and source context correctly.Cause. The two assertions pin V8's old
TypeErrorwording,Cannot read property 'length' of null(and… of undefined). Since the Node 16 line, V8 saysCannot read properties of null (reading 'length'). CI never noticed, because both workflows still test on Node 10, 12 and 14 only.This PR, in two commits:
test(pug): each assertion now accepts the old and the new exact wording, so it still checks what failed (lengthofnull/undefined), on any Node.ci: thetestjob intest.ymlandrollingversions.ymlruns on Node 18.x, 20.x, 22.x and 24.x, andactions/checkout/actions/setup-nodemove from v2 / v1 to v4 in every job. The publish jobs keep Node 24.x and theirregistry-url; nothing else changes (steps, permissions, triggers).Tests, on master
c323ed3e:yarn jest packages/pug/test/error.reporting.test.jspasses 22/22 with this change on Node 15.14.0 (old wording), 16.20.2, 18.20.8, 20.20.0, 22.22.0 and 24.21.0 (new wording). On master it fails 2/22 on Node 24.21.0.yarn teston Node 24: 650/650 pass. Master: 648/650 on Node 20, 22 and 24, the 2 failures being these assertions.prettier --list-differentis clean on the changed test file.The matrix is a proposal. No package declares
engines, so I picked 18 through 24, the versions I tested the change on. Happy to change it, for example to keep an older version, add a newer one, or test only the LTS lines in maintenance. This PR's own run is the first test of the new matrix andsetup-node@v4; the publish jobs only run on master, so they can't be checked here.The closed #3461 also relaxed these two assertions, as part of a different fix.