Passed
Push — master ( 67133e...c59620 )
by Huu-Phat
01:48 queued 10s
created

cms/src/core/utils/__test__/misc.spec.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 11
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 8
mnd 0
bc 0
fnc 2
dl 0
loc 11
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
1
import { isPathMatchUrl } from '../misc'
2
3
describe('Misc', () => {
4
  it('should match URL correctly with no error', function() {
5
    expect(isPathMatchUrl('/', '/')).toBe(true)
6
    expect(isPathMatchUrl('/user', '/')).toBe(false)
7
    expect(isPathMatchUrl('/', '/user')).toBe(false)
8
    expect(isPathMatchUrl('/user', '/profile')).toBe(false)
9
    expect(isPathMatchUrl('/settings/theme', '/settings')).toBe(true)
10
  })
11
})
12