Skip to content

Commit 492c8e7

Browse files
committed
fix: e2e errors
1 parent 814988b commit 492c8e7

File tree

7 files changed

+28
-7
lines changed

7 files changed

+28
-7
lines changed

e2e/fallback/basic.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { getText } from '../helper'
55
beforeAll(async () => {
66
page.on('console', msg => {
77
if (msg.type() === 'warning') {
8-
warnings.push(msg.text())
8+
const text = msg.text()
9+
if (!text.match(/^\[intlify\] Legacy API mode has been/)) {
10+
warnings.push(msg.text())
11+
}
912
}
1013
})
1114
await page.goto(

e2e/fallback/format.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { getText } from '../helper'
55
beforeAll(async () => {
66
page.on('console', msg => {
77
if (msg.type() === 'warning') {
8-
warnings.push(msg.text())
8+
const text = msg.text()
9+
if (!text.match(/^\[intlify\] Legacy API mode has been/)) {
10+
warnings.push(msg.text())
11+
}
912
}
1013
})
1114
await page.goto(

e2e/fallback/option.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { getText } from '../helper'
55
beforeAll(async () => {
66
page.on('console', msg => {
77
if (msg.type() === 'warning') {
8-
warnings.push(msg.text())
8+
const text = msg.text()
9+
if (!text.match(/^\[intlify\] Legacy API mode has been/)) {
10+
warnings.push(msg.text())
11+
}
912
}
1013
})
1114
await page.goto(

e2e/fallback/suppress.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { getText } from '../helper'
55
beforeAll(async () => {
66
page.on('console', msg => {
77
if (msg.type() === 'warning') {
8-
warnings.push(msg.text())
8+
const text = msg.text()
9+
if (!text.match(/^\[intlify\] Legacy API mode has been/)) {
10+
warnings.push(msg.text())
11+
}
912
}
1013
})
1114
await page.goto(

e2e/missing/handler.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { getText } from '../helper'
55
beforeAll(async () => {
66
page.on('console', msg => {
77
if (msg.type() === 'warning') {
8-
warnings.push(msg.text())
8+
const text = msg.text()
9+
if (!text.match(/^\[intlify\] Legacy API mode has been/)) {
10+
warnings.push(msg.text())
11+
}
912
}
1013
})
1114
await page.goto(

e2e/missing/option.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { getText } from '../helper'
55
beforeAll(async () => {
66
page.on('console', msg => {
77
if (msg.type() === 'warning') {
8-
warnings.push(msg.text())
8+
const text = msg.text()
9+
if (!text.match(/^\[intlify\] Legacy API mode has been/)) {
10+
warnings.push(msg.text())
11+
}
912
}
1013
})
1114
await page.goto(

e2e/missing/suppress.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { getText } from '../helper'
55
beforeAll(async () => {
66
page.on('console', msg => {
77
if (msg.type() === 'warning') {
8-
warnings.push(msg.text())
8+
const text = msg.text()
9+
if (!text.match(/^\[intlify\] Legacy API mode has been/)) {
10+
warnings.push(msg.text())
11+
}
912
}
1013
})
1114
await page.goto(

0 commit comments

Comments
 (0)