diff --git a/tests/global-errors.spec.ts b/tests/global-errors.spec.ts index ad82359e0..275a212dc 100644 --- a/tests/global-errors.spec.ts +++ b/tests/global-errors.spec.ts @@ -35,7 +35,7 @@ test('should report duplicate test title', async ({ activate }) => { await expect.poll(() => vscode.languages.getDiagnostics()).toEqual([ { message: 'Error: duplicate test title \"one\", first declared in test.spec.ts:3', - range: { start: { line: 4, character: 10 }, end: { line: 5, character: 0 } }, + range: { start: { line: 4, character: expect.any(Number) }, end: { line: 5, character: 0 } }, severity: 'Error', source: 'playwright', } diff --git a/tests/run-tests.spec.ts b/tests/run-tests.spec.ts index 86ad6dfea..0cc00af98 100644 --- a/tests/run-tests.spec.ts +++ b/tests/run-tests.spec.ts @@ -1056,7 +1056,7 @@ test('should produce output twice', async ({ activate }) => { expect(testItems.length).toBe(1); const testRun1 = await testController.run(testItems); - expect(testRun1.renderLog({ output: true })).toBe(` + expect(testRun1.renderLog({ output: true }).replace(/:3:\d+ ›/g, ':3 ›')).toBe(` tests > test.spec.ts > one [2:0] enqueued started @@ -1066,8 +1066,8 @@ test('should produce output twice', async ({ activate }) => { Running 1 test using 1 worker - [1/1] tests${path.sep}test.spec.ts:3:11 › one - tests${path.sep}test.spec.ts:3:11 › one + [1/1] tests${path.sep}test.spec.ts:3 › one + tests${path.sep}test.spec.ts:3 › one some output 1 passed (XXms) @@ -1075,7 +1075,7 @@ test('should produce output twice', async ({ activate }) => { `); const testRun2 = await testController.run(testItems); - expect(testRun2.renderLog({ output: true })).toBe(` + expect(testRun2.renderLog({ output: true }).replace(/:3:\d+ ›/g, ':3 ›')).toBe(` tests > test.spec.ts > one [2:0] enqueued enqueued @@ -1085,8 +1085,8 @@ test('should produce output twice', async ({ activate }) => { Running 1 test using 1 worker - [1/1] tests${path.sep}test.spec.ts:3:11 › one - tests${path.sep}test.spec.ts:3:11 › one + [1/1] tests${path.sep}test.spec.ts:3 › one + tests${path.sep}test.spec.ts:3 › one some output 1 passed (XXms)