@@ -35,6 +35,34 @@ describe('Core', function () {
35
35
] , done )
36
36
} )
37
37
38
+ it ( 'go() with object' , function ( done ) {
39
+ router = new Router ( { abstract : true } )
40
+ router . map ( {
41
+ '/a/:msg' : {
42
+ name : 'a' ,
43
+ component : { template : 'A{{$route.params.msg}}' }
44
+ } ,
45
+ '/b/:msg' : {
46
+ name : 'b' ,
47
+ component : { template : 'B{{$route.params.msg}}{{$route.query.msg}}' }
48
+ }
49
+ } )
50
+ var App = Vue . extend ( {
51
+ template : '<div><router-view></router-view></div>'
52
+ } )
53
+ router . start ( App , el )
54
+ assertRoutes ( [
55
+ [ { path : '/a/A' } , 'AA' ] ,
56
+ [ { path : '/b/B' } , 'BB' ] ,
57
+ // relative
58
+ [ { path : '../a/A' } , 'AA' ] ,
59
+ [ { path : '../b/B' } , 'BB' ] ,
60
+ // named routes
61
+ [ { name : 'a' , params : { msg : 'A' } } , 'AA' ] ,
62
+ [ { name : 'b' , params : { msg : 'B' } , query : { msg : 'B' } } , 'BBB' ]
63
+ ] , done )
64
+ } )
65
+
38
66
it ( 'matching nested views' , function ( done ) {
39
67
router = new Router ( { abstract : true } )
40
68
router . map ( {
@@ -89,6 +117,7 @@ describe('Core', function () {
89
117
} )
90
118
91
119
it ( 'route context' , function ( done ) {
120
+ Vue . config . silent = true
92
121
router = new Router ( { abstract : true } )
93
122
router . map ( {
94
123
'/a/:id' : {
@@ -122,7 +151,10 @@ describe('Core', function () {
122
151
[ '/a/123?id=234' , '/a/123?id=234,123,234,custom|/a/123?id=234,123,234,custom' ] ,
123
152
// relative query
124
153
[ '?id=345' , '/a/123?id=345,123,345,custom|/a/123?id=345,123,345,custom' ]
125
- ] , done )
154
+ ] , function ( ) {
155
+ Vue . config . silent = false
156
+ done ( )
157
+ } )
126
158
} )
127
159
128
160
it ( 'v-link' , function ( done ) {
0 commit comments