-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Please provide details about:
- What you're trying to do
npm test
- What happened
$ npm test
> [email protected] test
> ava
Uncaught exception in test.js
test.js:10
9:
10: test("get win/loss P PSuccess", (t) => {
11: const wl = getWinLossProbabilityPSuccess(0.186, 0.5, 5);
TypeError: Cannot destructure property 'payload' of 'sourceMap' as it is null.
› file://node_modules/mem/dist/index.js:42:27
› file://node_modules/mem/dist/index.js:42:27
› file://test.js:10:1
✔ get win/loss P PSuccess
ℹ 0.3573732358018241 0.6426267641981759
✖ Internal error when running test.js
TypeError: Cannot destructure property 'payload' of 'sourceMap' as it is null.
TypeError: Cannot destructure property 'payload' of 'sourceMap' as it is null.
at file:///home/mark/dev/agkund/sportsbook-data/node_modules/ava/lib/snapshot-manager.js:398:9
at file:///home/mark/dev/agkund/sportsbook-data/node_modules/mem/dist/index.js:42:27
at mem.cacheKey.file.file (file:///home/mark/dev/agkund/sportsbook-data/node_modules/ava/lib/snapshot-manager.js:409:31)
at file:///home/mark/dev/agkund/sportsbook-data/node_modules/mem/dist/index.js:42:27
at determineSnapshotPaths (file:///home/mark/dev/agkund/sportsbook-data/node_modules/ava/lib/snapshot-manager.js:428:14)
at load (file:///home/mark/dev/agkund/sportsbook-data/node_modules/ava/lib/snapshot-manager.js:468:16)
at get snapshots [as snapshots] (file:///home/mark/dev/agkund/sportsbook-data/node_modules/ava/lib/runner.js:204:21)
at Runner.saveSnapshotState (file:///home/mark/dev/agkund/sportsbook-data/node_modules/ava/lib/runner.js:228:36)
at file:///home/mark/dev/agkund/sportsbook-data/node_modules/ava/lib/worker/base.js:84:40
at /home/mark/dev/agkund/sportsbook-data/node_modules/emittery/index.js:319:13
✖ test.js exited with a non-zero exit code: 1
─
1 test passed
1 uncaught exception
- What you expected to happen
ava should work with node 18.8.0
it works fine with 18.7.0
Please share relevant sample code. Or better yet, provide a link to a minimal reproducible example.
could be related to the snapshot changes in node 18.8?
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#18.8.0
We'll also need your AVA configuration (in
package.json
orava.config.*
configuration files) and how you're invoking AVA. Share the installed AVA version (get it by runningnpx ava --version
).
ava version 4.3.1
no ava.config
markwylde