We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a362ea commit d84ed70Copy full SHA for d84ed70
examples/sites/demos/pc/app/anchor/change.spec.ts
@@ -11,11 +11,14 @@ test('change事件', async ({ page }) => {
11
const values = [] as string[]
12
page.on('console', async (msg) => {
13
for (const arg of msg.args()) {
14
- values.push(await arg.jsonValue())
+ const text = await arg.jsonValue()
15
+ if (text.includes('当前锚点')) {
16
+ values.push(text)
17
+ }
18
}
19
})
20
await link1.click()
21
await link2.click()
22
expect(values.length).toBe(2)
- expect(values[0].startsWith('当前锚点')).toBeTruthy()
23
+ expect(values[0].startsWith('当前锚点#basic-usage')).toBeTruthy()
24
0 commit comments