Skip to content

Snapshots not working on Node.js 18.8.0 #3092

@danez

Description

@danez

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions