mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-13 17:14:02 +03:00
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': `
|
||||
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.error('error');
|
||||
});
|
||||
@ -94,18 +98,18 @@ test('should work with custom reporter', async ({ runInlineTest }) => {
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(result.output.split('\n').filter(line => line.startsWith('%%'))).toEqual([
|
||||
'%%reporter-begin-begin%%',
|
||||
'%%reporter-testbegin-pass-foo%%',
|
||||
'%%reporter-testbegin-is run-foo%%',
|
||||
'%%reporter-stdout%%',
|
||||
'%%reporter-stderr%%',
|
||||
'%%reporter-testend-pass-foo%%',
|
||||
'%%reporter-testbegin-pass-foo%%',
|
||||
'%%reporter-testend-is run-foo%%',
|
||||
'%%reporter-testbegin-is run-foo%%',
|
||||
'%%reporter-stdout%%',
|
||||
'%%reporter-stderr%%',
|
||||
'%%reporter-testend-pass-foo%%',
|
||||
'%%reporter-testbegin-pass-bar%%',
|
||||
'%%reporter-testend-is run-foo%%',
|
||||
'%%reporter-testbegin-is run-bar%%',
|
||||
'%%reporter-stdout%%',
|
||||
'%%reporter-stderr%%',
|
||||
'%%reporter-testend-pass-bar%%',
|
||||
'%%reporter-testend-is run-bar%%',
|
||||
'%%reporter-end-end%%',
|
||||
]);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user