Skip to content

Commit e724261

Browse files
authored
Update api.spec.js
1 parent f9d556d commit e724261

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/unit/specs/api.spec.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,19 @@ describe('router app destroy handling', () => {
201201

202202
it('should remove 2nd destroyed app from this.apps', () => {
203203
app2.$destroy()
204+
expect(app1.$router).toBeDefined()
205+
expect(app1.$router.app).toBeDefined()
204206
expect(app1.$router.app).toBe(app1)
205207
expect(app1.$router.apps.length).toBe(2)
206-
expect(app1.$router.app[0]).toBe(app1)
207-
expect(app1.$router.app[1]).toBe(app3)
208+
expect(app1.$router.apps[0]).toBe(app1)
209+
expect(app1.$router.apps[1]).toBe(app3)
208210
})
209211

210212
it('should remove 1st destroyed app from this.apps and replace this.app', () => {
211213
app1.$destroy()
212214
expect(app3.$router.app).toBe(app3)
213215
expect(app3.$router.apps.length).toBe(1)
214-
expect(app3.$router.app[0]).toBe(app3)
216+
expect(app3.$router.apps[0]).toBe(app3)
215217
})
216218

217219
it('should remove last destroyed app from this.apps', () => {
@@ -227,6 +229,6 @@ describe('router app destroy handling', () => {
227229
})
228230
expect(app4.$router.app).toBe(app4)
229231
expect(app4.$router.apps.length).toBe(1)
230-
expect(app4.$router.app[0]).toBe(app4)
232+
expect(app4.$router.apps[0]).toBe(app4)
231233
})
232234
})

0 commit comments

Comments
 (0)