Test Failed
Push — master ( 4950ca...fdeb75 )
by Vinicius
02:58
created

test/router-support.test.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 25
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 15
mnd 0
bc 0
fnc 2
dl 0
loc 25
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
1
import VuePageTitle from '../src/index'
2
3
import { createLocalVue } from '@vue/test-utils'
4
import test from 'ava'
5
6
test('setup', t => {
7
  t.plan(1)
8
  const localVue = createLocalVue()
9
  const router = {
10
    afterEach: fn => {
11
      const to = {
12
        meta: {
13
          title: 'Graal'
14
        }
15
      }
16
17
      fn(to)
18
      fn({}) // for covarage purposes
19
20
      t.is(localVue.prototype.$title, 'Graal')
21
    }
22
  }
23
24
  localVue.use(VuePageTitle, { router })
25
})
26