observable.spec.ts — vue Source File
Architecture documentation for observable.spec.ts, a typescript file in the vue codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR e3447123_c1e8_9b56_293b_80a2c4af5eb5["observable.spec.ts"] c5601857_7faf_30c6_efca_20de90db006c["vue"] e3447123_c1e8_9b56_293b_80a2c4af5eb5 --> c5601857_7faf_30c6_efca_20de90db006c style e3447123_c1e8_9b56_293b_80a2c4af5eb5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
describe('Global API: observable', () => {
it('should work', done => {
const state = Vue.observable({
count: 0
})
const app = new Vue({
render(h) {
return h('div', [
h('span', state.count),
h(
'button',
{
on: {
click: () => {
state.count++
}
}
},
'+'
)
])
}
}).$mount()
expect(app.$el.querySelector('span').textContent).toBe('0')
app.$el.querySelector('button').click()
waitForUpdate(() => {
expect(app.$el.querySelector('span').textContent).toBe('1')
}).then(done)
})
})
Dependencies
- vue
Source
Frequently Asked Questions
What does observable.spec.ts do?
observable.spec.ts is a source file in the vue codebase, written in typescript.
What does observable.spec.ts depend on?
observable.spec.ts imports 1 module(s): vue.
Where is observable.spec.ts in the architecture?
observable.spec.ts is located at test/unit/features/global-api/observable.spec.ts (directory: test/unit/features/global-api).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free