Skip to content
weftGitHub

Diagnostics

T007

Snapshot without approval: it records today's output and passes against it.

Fix: Assert the behavior with role/label/text queries, or approve it with // weft-allow T007: <reason>.

Status in weft@0.1.0: reported by weft check on test files.

Triggers it:

tsx
import { render } from '@weft-js/core/test'import { Cart } from './Cart'test('cart', () => { render(Cart); expect(document.body.innerHTML).toMatchSnapshot() })

A test that needs it on purpose keeps it with a reason: // weft-allow T007: <why> in the file header (whole file) or on the line above.

More: weft docs testing.