mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
fix(ignoreSnapshots): print a notice when ignoreSnapshots option is on (#17317)
<img width="1161" alt="image" src="https://user-images.githubusercontent.com/746130/190032155-ae454c3e-1a7d-4a64-8cd6-bb27f9075ef3.png">
This commit is contained in:
parent
37e1dad684
commit
e295eea450
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user