cherry-pick(release-1.12): fix fixtures test (#6968)
This cherry-picks PR #6967 SHA 37af9ce3cf
This commit is contained in:
parent
ea45741ac0
commit
c698b9b96c
|
|
@ -529,7 +529,7 @@ test('should create a new worker for worker fixtures', async ({ runInlineTest })
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
const { test } = pwt;
|
const { test } = pwt;
|
||||||
test('base test', async ({}, testInfo) => {
|
test('base test', async ({}, testInfo) => {
|
||||||
expect(testInfo.workerIndex).toBe(1);
|
expect(testInfo.workerIndex).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
const test2 = test.extend({
|
const test2 = test.extend({
|
||||||
|
|
@ -539,7 +539,7 @@ test('should create a new worker for worker fixtures', async ({ runInlineTest })
|
||||||
}, { scope: 'worker' }],
|
}, { scope: 'worker' }],
|
||||||
});
|
});
|
||||||
test2('a test', async ({ foo }, testInfo) => {
|
test2('a test', async ({ foo }, testInfo) => {
|
||||||
expect(testInfo.workerIndex).toBe(0);
|
expect(testInfo.workerIndex).toBe(1);
|
||||||
});
|
});
|
||||||
`,
|
`,
|
||||||
'b.test.ts': `
|
'b.test.ts': `
|
||||||
|
|
@ -551,7 +551,7 @@ test('should create a new worker for worker fixtures', async ({ runInlineTest })
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
test2('b test', async ({ bar }, testInfo) => {
|
test2('b test', async ({ bar }, testInfo) => {
|
||||||
expect(testInfo.workerIndex).toBe(1);
|
expect(testInfo.workerIndex).toBe(0);
|
||||||
});
|
});
|
||||||
`,
|
`,
|
||||||
}, { workers: 1 });
|
}, { workers: 1 });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue