Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshots not working on Node.js 18.8.0 #3092

Closed
danez opened this issue Aug 25, 2022 · 2 comments
Closed

Snapshots not working on Node.js 18.8.0 #3092

danez opened this issue Aug 25, 2022 · 2 comments

Comments

@danez
Copy link
Contributor

danez commented Aug 25, 2022

Throws the following error:

  TypeError: Cannot destructure property 'payload' of 'sourceMap' as it is null.

This is happening because Node.js 18.8.0 changed the return value of findSourceMap from undefined to null if no source-map found (see here) and AVA is expecting undefined here.

Not sure if this was changed by mistake or on purpose in Node.js, so it might be reverted, but I wanted to raise this here in case other people run into this.

Might be anyway a good idea to change the if in ava to this?

-if (sourceMap === undefined) {
+if (sourceMap == undefined) {

nodejs/node#44391

@novemberborn
Copy link
Member

Thanks for reporting. See #3091.

@novemberborn novemberborn closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2022
@novemberborn
Copy link
Member

Should be fixed in 4.3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants