Skip to content

enhancement: support for node:test snapshotsΒ #3560

@boneskull

Description

@boneskull

Issue description or question

When running tests using Node.js' snapshot test facilities, I get the following two errors which do not appear when running tests from the command line:

Comparison with Node.js' assert module / deepStrictEqual / "to deep equal" / deepStrictEqual <snapshot>
Invalid state: Invalid snapshot filename.
TestContext.<anon> @ test/error/assert-error.test.ts:38:7 

Comparison with Node.js' assert module / deepStrictEqual / "to deep equal" / "to deep equal" <snapshot>
Invalid state: Invalid snapshot filename.
TestContext.<anon> @ test/error/assert-error.test.ts:42:7

The path to the snapshot file is test/error/assert-error.test.ts.snapshot, which both exists on disk and matches a files pattern in my Wallaby config.

If I had to guess, Wallaby doesn't support snapshot tests in node:test. This would then be a request to support them. πŸ˜„

Wallaby diagnostics report

Gist

Thanks for your work on Wallaby!

P.S. I'm seeing a "body is too large" error when attempting to paste the diagnostics file in; the issue template might need to direct issue creators to a different method!

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