assertInputWorks() — vue Function Reference
Architecture documentation for the assertInputWorks() function in model-dynamic.spec.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD efcdc564_f5fa_75f7_9afd_5fe13d6131d5["assertInputWorks()"] 6f8708eb_7e05_31cb_c7c1_02c55dc229ab["model-dynamic.spec.ts"] efcdc564_f5fa_75f7_9afd_5fe13d6131d5 -->|defined in| 6f8708eb_7e05_31cb_c7c1_02c55dc229ab style efcdc564_f5fa_75f7_9afd_5fe13d6131d5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
test/unit/features/directives/model-dynamic.spec.ts lines 191–234
function assertInputWorks(vm, type, chain) {
if (typeof type !== 'string') {
if (!chain) chain = type
type = 'type'
}
if (!chain) chain = waitForUpdate()
chain
.then(() => {
expect(vm.$el.value).toBe('b')
vm.test = 'a'
})
.then(() => {
expect(vm.$el.value).toBe('a')
vm.$el.value = 'c'
triggerEvent(vm.$el, 'input')
expect(vm.test).toBe('c')
})
.then(() => {
// change it to password
vm[type] = 'password'
vm.test = 'b'
})
.then(() => {
expect(vm.$el.type).toBe('password')
expect(vm.$el.value).toBe('b')
vm.$el.value = 'c'
triggerEvent(vm.$el, 'input')
expect(vm.test).toBe('c')
})
.then(() => {
// change it to checkbox...
vm[type] = 'checkbox'
})
.then(() => {
expect(vm.$el.type).toBe('checkbox')
expect(vm.$el.checked).toBe(true)
})
.then(() => {
vm.$el.click()
expect(vm.$el.checked).toBe(false)
expect(vm.test).toBe(false)
})
return chain
}
Domain
Subdomains
Source
Frequently Asked Questions
What does assertInputWorks() do?
assertInputWorks() is a function in the vue codebase, defined in test/unit/features/directives/model-dynamic.spec.ts.
Where is assertInputWorks() defined?
assertInputWorks() is defined in test/unit/features/directives/model-dynamic.spec.ts at line 191.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free