test: Remove test tmp folder after all tests are finished

This commit is contained in:
Joachim Van Herwegen
2023-10-05 17:03:42 +02:00
parent 3a57e88229
commit 9bf734817d
2 changed files with 8 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ module.exports = {
],
testEnvironment: 'node',
globalSetup: '<rootDir>/test/util/SetupTests.ts',
globalTeardown: '<rootDir>/test/util/TeardownTests.ts',
setupFilesAfterEnv: [ 'jest-rdf' ],
collectCoverage: false,
// See https://github.com/matthieubosquet/ts-dpop/issues/13

View File

@@ -0,0 +1,7 @@
import { getTestFolder, removeFolder } from '../integration/Config';
// Jest global teardown requires a single function to be exported
export default async function(): Promise<void> {
// Clean up the root test folder
await removeFolder(getTestFolder(''));
}