const app = createApp(BasicComponentWithUseId)
return [app, []]
}),
- ).toBe('v:0 v:1')
+ ).toBe('v-0 v-1')
})
test('with config.idPrefix', async () => {
app.config.idPrefix = 'foo'
return [app, []]
}),
- ).toBe('foo:0 foo:1')
+ ).toBe('foo-0 foo-1')
})
test('async component', async () => {
}
const expected =
- 'v:0 v:1 ' + // root
- 'v:0-0 v:0-1 ' + // inside first async subtree
- 'v:1-0 v:1-1' // inside second async subtree
+ 'v-0 v-1 ' + // root
+ 'v-0-0 v-0-1 ' + // inside first async subtree
+ 'v-1-0 v-1-1' // inside second async subtree
// assert different async resolution order does not affect id stable-ness
expect(await getOutput(() => factory(0, 16))).toBe(expected)
expect(await getOutput(() => factory(16, 0))).toBe(expected)
}
const expected =
- 'v:0 v:1 ' + // root
- 'v:0-0 v:0-1 ' + // inside first async subtree
- 'v:1-0 v:1-1' // inside second async subtree
+ 'v-0 v-1 ' + // root
+ 'v-0-0 v-0-1 ' + // inside first async subtree
+ 'v-1-0 v-1-1' // inside second async subtree
// assert different async resolution order does not affect id stable-ness
expect(await getOutput(() => factory(0, 16))).toBe(expected)
expect(await getOutput(() => factory(16, 0))).toBe(expected)
const expected =
'<div>' +
- 'v:0 v:1 ' + // root
- 'v:0-0 v:0-1 ' + // inside first async subtree
- 'v:1-0 v:1-1' + // inside second async subtree
+ 'v-0 v-1 ' + // root
+ 'v-0-0 v-0-1 ' + // inside first async subtree
+ 'v-1-0 v-1-1' + // inside second async subtree
'</div>'
// assert different async resolution order does not affect id stable-ness
expect(await getOutput(() => factory(0, 16))).toBe(expected)
}
const expected =
- 'v:0 ' + // One
- 'v:0-0 ' + // Two
- 'v:0-0-0 v:0-0-1 ' + // Three + Three nested in Two
- 'v:0-1' // Three after Two
+ 'v-0 ' + // One
+ 'v-0-0 ' + // Two
+ 'v-0-0-0 v-0-0-1 ' + // Three + Three nested in Two
+ 'v-0-1' // Three after Two
// assert different async resolution order does not affect id stable-ness
expect(await getOutput(() => factory())).toBe(expected)
expect(await getOutput(() => factory())).toBe(expected)
const expected =
'<div>' +
- 'v:0 v:1 ' + // root
- 'v:0-0-0 v:0-0-1' + // async component inside async setup
+ 'v-0 v-1 ' + // root
+ 'v-0-0-0 v-0-0-1' + // async component inside async setup
'</div>'
// assert different async resolution order does not affect id stable-ness
expect(await getOutput(async () => factory(0, 16))).toBe(expected)