transition.spec.ts — vue Source File
Architecture documentation for transition.spec.ts, a typescript file in the vue codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 4589ee86_a3c5_87f5_c259_ee19bd430d0e["transition.spec.ts"] 17e86ae4_9dda_9399_9625_68fceea277c4["helpers.ts"] 4589ee86_a3c5_87f5_c259_ee19bd430d0e --> 17e86ae4_9dda_9399_9625_68fceea277c4 79b3dbe8_b79b_b5de_51cf_dd6781dae129["injectStyles"] 4589ee86_a3c5_87f5_c259_ee19bd430d0e --> 79b3dbe8_b79b_b5de_51cf_dd6781dae129 db9e7bef_009d_3918_6e7d_543a36a38d75["vue"] 4589ee86_a3c5_87f5_c259_ee19bd430d0e --> db9e7bef_009d_3918_6e7d_543a36a38d75 style 4589ee86_a3c5_87f5_c259_ee19bd430d0e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
import { injectStyles, waitForUpdate, nextFrame } from './helpers'
describe('Transition basic', () => {
const { duration, buffer } = injectStyles() as {
duration: number
buffer: number
}
const explicitDuration = duration * 2
let el
beforeEach(() => {
el = document.createElement('div')
document.body.appendChild(el)
})
it('basic transition', done => {
const vm = new Vue({
template:
'<div><transition><div v-if="ok" class="test">foo</div></transition></div>',
data: { ok: true }
}).$mount(el)
// should not apply transition on initial render by default
expect(vm.$el.innerHTML).toBe('<div class="test">foo</div>')
vm.ok = false
waitForUpdate(() => {
expect(vm.$el.children[0].className).toBe('test v-leave v-leave-active')
})
.thenWaitFor(nextFrame)
.then(() => {
expect(vm.$el.children[0].className).toBe(
'test v-leave-active v-leave-to'
)
})
.thenWaitFor(duration + buffer)
.then(() => {
expect(vm.$el.children.length).toBe(0)
vm.ok = true
})
.then(() => {
expect(vm.$el.children[0].className).toBe('test v-enter v-enter-active')
})
.thenWaitFor(nextFrame)
.then(() => {
expect(vm.$el.children[0].className).toBe(
'test v-enter-active v-enter-to'
)
})
.thenWaitFor(duration + buffer)
.then(() => {
expect(vm.$el.children[0].className).toBe('test')
})
.then(done)
})
it('named transition', done => {
const vm = new Vue({
template:
'<div><transition name="test"><div v-if="ok" class="test">foo</div></transition></div>',
// ... (1783 more lines)
Domain
Dependencies
Source
Frequently Asked Questions
What does transition.spec.ts do?
transition.spec.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain.
What does transition.spec.ts depend on?
transition.spec.ts imports 3 module(s): helpers.ts, injectStyles, vue.
Where is transition.spec.ts in the architecture?
transition.spec.ts is located at test/transition/transition.spec.ts (domain: VueCore, directory: test/transition).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free