MCPcopy
hub / github.com/jestjs/jest / assertFailuresAndSnapshot

Function assertFailuresAndSnapshot

e2e/__tests__/wrongEnv.test.ts:12–16  ·  view source on GitHub ↗
(args: Array<string>)

Source from the content-addressed store, hash-verified

10import runJest from '../runJest';
11
12function assertFailuresAndSnapshot(args: Array<string>) {
13 const result = runJest('wrong-env', args);
14 expect(result.exitCode).toBe(1);
15 expect(extractSummary(result.stderr).rest).toMatchSnapshot();
16}
17
18describe('Wrong globals for environment', () => {
19 it('print useful error for window', () => {

Callers 1

wrongEnv.test.tsFile · 0.85

Calls 5

extractSummaryFunction · 0.90
expectFunction · 0.85
toBeMethod · 0.80
toMatchSnapshotMethod · 0.80
runJestFunction · 0.50

Tested by

no test coverage detected