Updated actions/checkout@v3 to actions/checkout@v4 so it doesn't complain about node 20.
Updated actions/cache@v3 to actions/cache@v4 so it doesn't complain about node 20.
Failure in __test__/backend.test.js
Specify the campaign due date as milliseconds since the epoch when testing with SQLite.
I did a quick smoke test of copying a campaign in the UI when using SQLite and no additional special handling was necessary.
Failure in __test__/extensions/action-handlers/ngpvan-action.test.js
The failing test was testing a failure caused by trying to parse an object as if it were a JSON string.
It’s failing because the exception thrown by a JSON parse error changed between Node versions.
Node 16.18.0
==> node
Welcome to Node.js v16.18.0.
Type ".help" for more information.
> JSON.parse("{")
Uncaught SyntaxError: Unexpected end of JSON input
> JSON.parse({})
Uncaught SyntaxError: Unexpected token o in JSON at position 1
Node 20.11.1
==> nvm use 20.11.1
Now using node v20.11.1 (npm v10.2.4)
==> node
Welcome to Node.js v20.11.1.
Type ".help" for more information.
> JSON.parse({})
Uncaught SyntaxError: "[object Object]" is not valid JSON
Checklist:
[ ] I have manually tested my changes on desktop and mobile
[ ] The test suite passes locally with my changes
[ ] If my change is a UI change, I have attached a screenshot to the description section of this pull request
This PR fixes a couple of failing tests.
Additional context in a slack thread.
Description
ERR_REQUIRE_ESM errors
Pinned
strip-ansi
to 6.0.1.Failing actions
actions/checkout@v3
toactions/checkout@v4
so it doesn't complain about node 20.actions/cache@v3
toactions/cache@v4
so it doesn't complain about node 20.Failure in
__test__/backend.test.js
Specify the campaign due date as milliseconds since the epoch when testing with SQLite.
I did a quick smoke test of copying a campaign in the UI when using SQLite and no additional special handling was necessary.
Failure in
__test__/extensions/action-handlers/ngpvan-action.test.js
The failing test was testing a failure caused by trying to parse an object as if it were a JSON string.
It’s failing because the exception thrown by a JSON parse error changed between Node versions.
Node 16.18.0
Node 20.11.1
Checklist: