Completed
Push — master ( 395a8a...5b5be3 )
by greg
02:00
created

test/core/utils/slug.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 29
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 1
dl 0
loc 29
rs 10
wmc 2
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 3

1 Function

Rating   Name   Duplication   Size   Complexity  
A describe(ꞌcoreUtils.slugꞌ) 0 15 1
1
import chai from 'chai'
2
import path from 'path'
3
import sinonChai from'sinon-chai'
4
chai.use(sinonChai)
5
import sinon from 'sinon'
6
7
import {
8
  coreUtils,
9
  abeExtend,
0 ignored issues
show
Unused Code introduced by
The variable abeExtend seems to be never used. Consider removing it.
Loading history...
10
  cmsData,
0 ignored issues
show
Unused Code introduced by
The variable cmsData seems to be never used. Consider removing it.
Loading history...
11
  config
12
} from '../../../src/cli'
13
config.set({root: path.join(process.cwd(), 'test', 'fixtures')})
14
15
describe('coreUtils.slug', function() {
16
17
  var arr = [{'test': 'val'}, {'test2': 'val2'}];
0 ignored issues
show
Unused Code introduced by
The variable arr seems to be never used. Consider removing it.
Loading history...
18
19
  /**
20
   * coreUtils.slug.clean
21
   * 
22
   */
23
  it('coreUtils.slug.clean()', function() {
24
    var result = coreUtils.slug.clean('té§eèàº^^s:t sLuG');
25
    chai.expect(result).to.be.a('string')
26
    chai.expect(result).to.equal('te-eeao-s-t-slug.html')
27
  });
28
29
});
30