Skip to content

Commit

Permalink
Chore: (test) working with tmp dir for test factory
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed Aug 6, 2019
1 parent e195b58 commit cfeafbc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
etc/*.js
etc/*.json
lib/*
coverage/*
coverage/*
tmp/*
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ tests
.travis.yml
.eslintrc
.eslintignore
.babelrc
.babelrc
tmp
15 changes: 15 additions & 0 deletions tests/Test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import fse from 'fs-extra';
import { tmpFolder } from './constants';

export default class Test {
async setTmpFolder() {
await fse.ensureDir(tmpFolder);
}
async cleanTmpFolder() {
await fse.remove(tmpFolder);
}
}

export {
tmpFolder
};
7 changes: 7 additions & 0 deletions tests/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import path from 'path';

const tmpFolder = path.join(__dirname, '../tmp/tests');

export {
tmpFolder
};

0 comments on commit cfeafbc

Please sign in to comment.