Total Complexity | 4 |
Complexity/F | 1 |
Lines of Code | 27 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /* eslint func-names: 0 */ |
||
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 |