test/building/main.spec.js   A
last analyzed

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 28
Function Count 4

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 28
rs 10
wmc 4
mnd 0
bc 4
fnc 4
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A main.spec.js ➔ describe(ꞌGeneralꞌ) 0 19 1
1
/* eslint func-names: 0 */
2
3
'use strict';
4
5
var chai = require('chai');
6
var expect = chai.expect;
7
var path = require('path');
8
var shell = require('shelljs');
9
10
chai.use(require('chai-fs-latest'));
11
12
describe('General', function () {
13
  var projectRoot = path.resolve(__dirname, '..', '..');
14
15
  before(function () {
16
    shell.cd(projectRoot);
17
  });
18
19
  describe('build (requires project clean for valid testing)', function () {
20
    this.timeout(30000);
21
22
    it('should create a build directory at the project root', function () {
23
      shell.exec('npm run build --silent', {
24
        silent: true
25
      });
26
27
      expect(path.join(projectRoot, 'build')).to.be.a.directory();
28
    });
29
  });
30
});
31