model-dynamic.spec.ts — vue Source File
Architecture documentation for model-dynamic.spec.ts, a typescript file in the vue codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6f8708eb_7e05_31cb_c7c1_02c55dc229ab["model-dynamic.spec.ts"] db9e7bef_009d_3918_6e7d_543a36a38d75["vue"] 6f8708eb_7e05_31cb_c7c1_02c55dc229ab --> db9e7bef_009d_3918_6e7d_543a36a38d75 style 6f8708eb_7e05_31cb_c7c1_02c55dc229ab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
describe('Directive v-model dynamic input type', () => {
it('should work', done => {
const vm = new Vue({
data: {
inputType: null,
test: 'b'
},
template: `<input :type="inputType" v-model="test">`
}).$mount()
document.body.appendChild(vm.$el)
// test text
assertInputWorks(vm, 'inputType').then(done)
})
it('with v-if', done => {
const vm = new Vue({
data: {
ok: true,
type: null,
test: 'b'
},
template: `<input v-if="ok" :type="type" v-model="test"><div v-else>haha</div>`
}).$mount()
document.body.appendChild(vm.$el)
const chain = assertInputWorks(vm)
.then(() => {
vm.ok = false
})
.then(() => {
expect(vm.$el.textContent).toBe('haha')
})
.then(() => {
// reset
vm.ok = true
vm.type = null
vm.test = 'b'
})
assertInputWorks(vm, chain).then(done)
})
it('with v-else', done => {
const data = {
ok: true,
type: null,
test: 'b'
}
const vm = new Vue({
data,
template: `<div v-if="ok">haha</div><input v-else :type="type" v-model="test">`
}).$mount()
document.body.appendChild(vm.$el)
expect(vm.$el.textContent).toBe('haha')
vm.ok = false
assertInputWorks(vm).then(done)
// ... (175 more lines)
Domain
Subdomains
Functions
Dependencies
- vue
Source
Frequently Asked Questions
What does model-dynamic.spec.ts do?
model-dynamic.spec.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, Observer subdomain.
What functions are defined in model-dynamic.spec.ts?
model-dynamic.spec.ts defines 1 function(s): assertInputWorks.
What does model-dynamic.spec.ts depend on?
model-dynamic.spec.ts imports 1 module(s): vue.
Where is model-dynamic.spec.ts in the architecture?
model-dynamic.spec.ts is located at test/unit/features/directives/model-dynamic.spec.ts (domain: VueCore, subdomain: Observer, directory: test/unit/features/directives).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free