Skip to content

Commit

Permalink
test: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Nov 27, 2024
1 parent e2771df commit 3fd4ef7
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions packages/runtime-core/__tests__/components/BaseTransition.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1200,25 +1200,23 @@ describe('BaseTransition', () => {
})

// #12465
test('mode: "out-in" KeepAlive fallthroughAttrs by PROD', async () => {
test('mode: "out-in" w/ KeepAlive + fallthrough attrs (prod mode)', async () => {
__DEV__ = false
async function testOutIn({ trueBranch, falseBranch }: ToggleOptions) {
const toggle = ref(true)
const { props, cbs } = mockProps({ mode: 'out-in' }, true)
const root = nodeOps.createElement('div')
const show = ref(true)
const App = {
render() {
return show.value
? h(
BaseTransition,
{
...props,
class: 'test',
},
h(KeepAlive, null, toggle.value ? trueBranch() : falseBranch()),
)
: null
return h(
BaseTransition,
{
...props,
class: 'test',
},
() =>
h(KeepAlive, null, toggle.value ? trueBranch() : falseBranch()),
)
},
}
render(h(App), root)
Expand Down

0 comments on commit 3fd4ef7

Please sign in to comment.