test: test app asset retrieval
This commit is contained in:
parent
acda3cf2d9
commit
406dcb0a7a
@ -73,7 +73,11 @@ describe('api: createApp', () => {
|
|||||||
|
|
||||||
test('component', () => {
|
test('component', () => {
|
||||||
const app = createApp()
|
const app = createApp()
|
||||||
app.component('FooBar', () => 'foobar!')
|
|
||||||
|
const FooBar = () => 'foobar!'
|
||||||
|
app.component('FooBar', FooBar)
|
||||||
|
expect(app.component('FooBar')).toBe(FooBar)
|
||||||
|
|
||||||
app.component('BarBaz', () => 'barbaz!')
|
app.component('BarBaz', () => 'barbaz!')
|
||||||
|
|
||||||
const Root = {
|
const Root = {
|
||||||
@ -103,9 +107,11 @@ describe('api: createApp', () => {
|
|||||||
const spy1 = jest.fn()
|
const spy1 = jest.fn()
|
||||||
const spy2 = jest.fn()
|
const spy2 = jest.fn()
|
||||||
const spy3 = jest.fn()
|
const spy3 = jest.fn()
|
||||||
app.directive('FooBar', {
|
|
||||||
mounted: spy1
|
const FooBar = { mounted: spy1 }
|
||||||
})
|
app.directive('FooBar', FooBar)
|
||||||
|
expect(app.directive('FooBar')).toBe(FooBar)
|
||||||
|
|
||||||
app.directive('BarBaz', {
|
app.directive('BarBaz', {
|
||||||
mounted: spy2
|
mounted: spy2
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user