Skip to content

Commit

Permalink
fix(ignoreSnapshots): print a notice when ignoreSnapshots option is on (
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov authored Sep 14, 2022
1 parent 37e1dad commit e295eea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/playwright-test/src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { Loader } from './loader';
import type { FullResult, Reporter, TestError } from '../types/testReporter';
import { Multiplexer } from './reporters/multiplexer';
import { formatError } from './reporters/base';
import { colors } from 'playwright-core/lib/utilsBundle';
import DotReporter from './reporters/dot';
import GitHubReporter from './reporters/github';
import LineReporter from './reporters/line';
Expand Down Expand Up @@ -401,6 +402,15 @@ export class Runner {
if (result.status !== 'passed')
return result;

if (config._ignoreSnapshots) {
this._reporter.onStdOut?.(colors.dim([
'NOTE: running with "ignoreSnapshots" option. All of the following asserts are silently ignored:',
'- expect().toMatchSnapshot()',
'- expect().toHaveScreenshot()',
'',
].join('\n')));
}

// 14. Run tests.
try {
const sigintWatcher = new SigIntWatcher();
Expand Down

0 comments on commit e295eea

Please sign in to comment.