diff options
-rw-r--r-- | jest.config.js | 3 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | test/teardown.ts | 5 | ||||
-rw-r--r-- | test/test.env | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/jest.config.js b/jest.config.js index b541da5..41f1c01 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,6 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', - globalSetup: "./test/setup.ts" + globalSetup: "./test/setup.ts", + globalTeardown: "./test/teardown.ts" };
\ No newline at end of file diff --git a/package.json b/package.json index 85bf0f2..0bf51d9 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "HampusMat", "private": true, "scripts": { - "clean": "rm -rf node_modules git packages/*/node_modules packages/client/dist", + "clean": "rm -rf node_modules packages/*/node_modules packages/client/dist", "dev": "concurrently -k --kill-others-on-fail \"cd packages/client && yarn serve\" \"cd packages/server && yarn dev\"", "build": "cd packages/client && yarn build", "start": "ts-node packages/server/src/app.ts", diff --git a/test/teardown.ts b/test/teardown.ts new file mode 100644 index 0000000..3712af2 --- /dev/null +++ b/test/teardown.ts @@ -0,0 +1,5 @@ +import { remove } from "fs-extra"; + +export default async function teardown() { + await remove(process.env.BASE_DIR); +}
\ No newline at end of file diff --git a/test/test.env b/test/test.env index 2742aac..42ff7dd 100644 --- a/test/test.env +++ b/test/test.env @@ -1,4 +1,4 @@ -BASE_DIR=git +BASE_DIR=/tmp/nodegit_test AVAIL_REPO=githermit.git AVAIL_REPO_URL=https://gitlab.com/HampusMat/githermit.git UNAVAIL_REPO=angular |