Skip to content

Commit

Permalink
Merge 8ad10a3 into 3cb2003
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimvh authored Aug 2, 2021
2 parents 3cb2003 + 8ad10a3 commit 647571f
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 54 deletions.
135 changes: 91 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@
"@tsconfig/node12": "^1.0.9",
"@types/cheerio": "^0.22.29",
"@types/ejs": "^3.0.6",
"@types/fs-extra": "^9.0.12",
"@types/jest": "^26.0.23",
"@types/rimraf": "^3.0.0",
"@types/set-cookie-parser": "^2.4.0",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^4.28.1",
Expand All @@ -158,13 +158,13 @@
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-tsdoc": "^0.2.14",
"eslint-plugin-unused-imports": "^1.1.1",
"fs-extra": "^10.0.0",
"husky": "^4.3.8",
"jest": "^27.0.6",
"jest-rdf": "^1.6.0",
"manual-git-changelog": "^1.0.1",
"node-mocks-http": "^1.10.1",
"nodemon": "^2.0.7",
"rimraf": "^3.0.2",
"set-cookie-parser": "^2.4.8",
"supertest": "^6.1.3",
"ts-jest": "^27.0.3",
Expand Down
6 changes: 3 additions & 3 deletions test/integration/Config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { IModuleState } from 'componentsjs';
import { ComponentsManager } from 'componentsjs';
import * as rimraf from 'rimraf';
import { remove } from 'fs-extra';
import { joinFilePath } from '../../src/util/PathUtil';

let cachedModuleState: IModuleState;
Expand Down Expand Up @@ -38,8 +38,8 @@ export function getTestFolder(name: string): string {
return joinFilePath(__dirname, '../tmp', name);
}

export function removeFolder(folder: string): void {
rimraf.sync(folder, { glob: false });
export async function removeFolder(folder: string): Promise<void> {
await remove(folder);
}

export function getDefaultVariables(port: number, baseUrl?: string): Record<string, any> {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/DynamicPods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const podConfigJson = joinFilePath(rootFilePath, 'config-pod.json');

const configs: [string, any][] = [
[ 'memory.json', {
teardown: (): void => removeFolder(rootFilePath),
teardown: async(): Promise<void> => removeFolder(rootFilePath),
}],
[ 'filesystem.json', {
teardown: (): void => removeFolder(rootFilePath),
teardown: async(): Promise<void> => removeFolder(rootFilePath),
}],
];

Expand Down
2 changes: 1 addition & 1 deletion test/integration/LdpHandlerWithAuth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const stores: [string, any][] = [
}],
[ 'on-disk storage', {
storeConfig: 'storage/backend/file.json',
teardown: (): void => removeFolder(rootFilePath),
teardown: async(): Promise<void> => removeFolder(rootFilePath),
}],
];

Expand Down
2 changes: 1 addition & 1 deletion test/integration/LdpHandlerWithoutAuth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const stores: [string, any][] = [
}],
[ 'on-disk storage', {
storeConfig: 'storage/backend/file.json',
teardown: (): void => removeFolder(rootFilePath),
teardown: async(): Promise<void> => removeFolder(rootFilePath),
}],
];

Expand Down
2 changes: 1 addition & 1 deletion test/integration/Subdomains.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const stores: [string, any][] = [
}],
[ 'on-disk storage', {
storeConfig: 'storage/backend/file.json',
teardown: (): void => removeFolder(rootFilePath),
teardown: async(): Promise<void> => removeFolder(rootFilePath),
}],
];

Expand Down

0 comments on commit 647571f

Please sign in to comment.