Passed
Pull Request — master (#17)
by
unknown
01:26
created

test/building/main.spec.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 27
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
nc 1
dl 0
loc 27
rs 10
c 1
b 0
f 0
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 ➔ ??? 0 19 1
1
/* eslint func-names: 0 */
2
3
const chai = require('chai');
4
5
const expect = chai.expect;
6
const path = require('path');
7
const shell = require('shelljs');
8
9
chai.use(require('chai-fs-latest'));
10
11
describe('General', () => {
12
  const projectRoot = path.resolve(__dirname, '..', '..');
13
14
  before(() => {
15
    shell.cd(projectRoot);
16
  });
17
18
  describe('build (requires project clean for valid testing)', function () {
19
    this.timeout(30000);
20
21
    it('should create a build directory at the project root', () => {
22
      shell.exec('npm run build --silent', {
23
        silent: true,
24
      });
25
26
      expect(path.join(projectRoot, 'build')).to.be.a.directory();
27
    });
28
  });
29
});
30