Completed
Push — master ( 273a12...880c09 )
by
unknown
02:14
created

test/data.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 32
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A data.js ➔ describe(ꞌDataꞌ) 0 22 1
1
var chai = require('chai');
2
var path = require('path');
3
4
var config = require('../src/cli').config
5
config.set({root: __dirname + '/fixtures/'})
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
6
7
var cmsTemplate = require('../src/cli').cmsTemplate;
8
var Manager = require('../src/cli').Manager;
9
var fse = require('fs-extra');
10
11
describe('Data', function() {
12
  before( function(done) {
13
    Manager.instance.init()
14
      .then(function () {
15
16
        this.fixture = {
17
          articleEach: fse.readFileSync(__dirname + '/fixtures/templates/article-each-abe.html', 'utf8'),
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
18
        }
19
        done()
20
        
21
      }.bind(this))
22
  });
23
24
  /**
25
   * cmsTemplate.encodeAbeTagAsComment
26
   * 
27
   */
28
  it('cmsTemplate.encodeAbeTagAsComment()', function() {
29
    var txt = cmsTemplate.encodeAbeTagAsComment(this.fixture.articleEach);
30
    chai.expect(txt.indexOf('{')).to.equal(-1);
31
  });
32
});
33