test(test runner): check custom reporter with .only tests (#7862)
This commit is contained in:
parent
cf886b3829
commit
cb978848d9
|
|
@ -84,7 +84,11 @@ test('should work with custom reporter', async ({ runInlineTest }) => {
|
||||||
`,
|
`,
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
const { test } = pwt;
|
const { test } = pwt;
|
||||||
test('pass', async ({}) => {
|
test('not run', async ({}) => {
|
||||||
|
console.log('log');
|
||||||
|
console.error('error');
|
||||||
|
});
|
||||||
|
test.only('is run', async ({}) => {
|
||||||
console.log('log');
|
console.log('log');
|
||||||
console.error('error');
|
console.error('error');
|
||||||
});
|
});
|
||||||
|
|
@ -94,18 +98,18 @@ test('should work with custom reporter', async ({ runInlineTest }) => {
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(0);
|
||||||
expect(result.output.split('\n').filter(line => line.startsWith('%%'))).toEqual([
|
expect(result.output.split('\n').filter(line => line.startsWith('%%'))).toEqual([
|
||||||
'%%reporter-begin-begin%%',
|
'%%reporter-begin-begin%%',
|
||||||
'%%reporter-testbegin-pass-foo%%',
|
'%%reporter-testbegin-is run-foo%%',
|
||||||
'%%reporter-stdout%%',
|
'%%reporter-stdout%%',
|
||||||
'%%reporter-stderr%%',
|
'%%reporter-stderr%%',
|
||||||
'%%reporter-testend-pass-foo%%',
|
'%%reporter-testend-is run-foo%%',
|
||||||
'%%reporter-testbegin-pass-foo%%',
|
'%%reporter-testbegin-is run-foo%%',
|
||||||
'%%reporter-stdout%%',
|
'%%reporter-stdout%%',
|
||||||
'%%reporter-stderr%%',
|
'%%reporter-stderr%%',
|
||||||
'%%reporter-testend-pass-foo%%',
|
'%%reporter-testend-is run-foo%%',
|
||||||
'%%reporter-testbegin-pass-bar%%',
|
'%%reporter-testbegin-is run-bar%%',
|
||||||
'%%reporter-stdout%%',
|
'%%reporter-stdout%%',
|
||||||
'%%reporter-stderr%%',
|
'%%reporter-stderr%%',
|
||||||
'%%reporter-testend-pass-bar%%',
|
'%%reporter-testend-is run-bar%%',
|
||||||
'%%reporter-end-end%%',
|
'%%reporter-end-end%%',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue