Skip to content

Commit d01eaf3

Browse files
committed
test: assert $route presence in data()
1 parent 6ff48a0 commit d01eaf3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/unit/specs/core.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ describe('Core', function () {
1414
it('matching views', function (done) {
1515
router = new Router({ abstract: true })
1616
router.map({
17-
'/a': { component: { template: 'AAA' }},
17+
'/a': { component: {
18+
template: 'AAA',
19+
data: function () {
20+
expect(this.$route).toBeTruthy()
21+
}
22+
}},
1823
'/b': { component: { template: 'BBB' }}
1924
})
2025
var App = Vue.extend({

0 commit comments

Comments
 (0)