Passed
Push — master ( fd5993...4f9324 )
by Vinicius
03:57 queued 01:54
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 1
Bugs 0 Features 0
Metric Value
cc 0
eloc 15
nc 1
dl 0
loc 25
rs 10
c 1
b 0
f 0
wmc 2
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A router-support.test.js ➔ ??? 0 20 1
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