diff --git a/packages/playwright-test/src/runner.ts b/packages/playwright-test/src/runner.ts index 6cd71b5016fdf..144c188cb7b7c 100644 --- a/packages/playwright-test/src/runner.ts +++ b/packages/playwright-test/src/runner.ts @@ -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'; @@ -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();