tests/Test.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 22
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 12
mnd 0
bc 0
fnc 3
dl 0
loc 22
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10

3 Functions

Rating   Name   Duplication   Size   Complexity  
A Test.setTmpFolder 0 3 1
A Test.cleanTmpFolder 0 3 1
A Test.setPacker 0 5 1
1
import fse from 'fs-extra';
2
import { tmpFolder } from './constants';
3
4
export * from './utils';
5
// eslint-disable-next-line import/export
6
export * from './constants';
7
8
export default class Test {
9
    async setTmpFolder() {
10
        await fse.ensureDir(tmpFolder);
11
    }
12
13
    async setPacker(Packer) {
14
        this.packer = new Packer();
15
16
        return this.packer;
17
    }
18
19
    async cleanTmpFolder() {
20
        await fse.remove(tmpFolder);
21
    }
22
}
23
24