mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
682 B
682 B
Suggest using inline snapshots (prefer-inline-snapshots)
In order to make snapshot tests more managable and reviewable
toMatchInlineSnapshot()
and toThrowErrorMatchingInlineSnapshot
should be
used to write the snapshots inline in the test file.
Rule details
This rule triggers a warning if toMatchSnapshot()
or
toThrowErrorMatchingSnapshot
is used to capture a snapshot.
The following pattern is considered warning:
expect(obj).toMatchSnapshot();
expect(error).toThrowErrorMatchingSnapshot();
The following pattern is not warning:
expect(obj).toMatchInlineSnapshot();
expect(error).toThrowErrorMatchingInlineSnapshot();