Skip to content

enhancement: support for node:test snapshots #3560

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!

Activity

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

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