Skip to content

Commit 057163e

Browse files
committed
improve coverage
1 parent 34044c5 commit 057163e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ class Router {
250250
'root container.'
251251
)
252252
}
253+
/* istanbul ignore if */
253254
if (App instanceof Vue) {
254255
throw new Error(
255256
'Must start vue-router with a component, not a ' +

src/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export function warn (msg) {
1515
/* istanbul ignore next */
1616
if (window.console) {
1717
console.warn('[vue-router] ' + msg)
18-
/* istanbul ignore if */
1918
if (!exports.Vue || exports.Vue.config.debug) {
2019
console.warn(new Error('warning stack trace:').stack)
2120
}
@@ -137,6 +136,7 @@ export function resolveAsyncComponent (handler, cb) {
137136
export function mapParams (path, params = {}, query) {
138137
path = path.replace(/:([^\/]+)/g, (_, key) => {
139138
let val = params[key]
139+
/* istanbul ignore if */
140140
if (!val) {
141141
warn(
142142
'param "' + key + '" not found when generating ' +

test/unit/specs/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ describe('Core', function () {
342342
router.start({
343343
replace: false,
344344
template:
345-
'<div v-link><a id="link" href="/a"></a></div>' +
345+
'<div v-link><a href="/a"><span id="link"></span></a></div>' +
346346
'<router-view></router-view>'
347347
}, el)
348348
var link = el.querySelector('#link')

0 commit comments

Comments
 (0)