提交 d3229242 编写于 作者: J Joao Moreno

smoke: better rimraf in main

上级 eb4760d2
......@@ -14,7 +14,7 @@
"@types/mocha": "^2.2.41",
"@types/ncp": "^2.0.1",
"@types/node": "^8.0.26",
"@types/rimraf": "^0.0.28",
"@types/rimraf": "^2.0.2",
"@types/webdriverio": "^4.6.1",
"htmlparser2": "^3.9.2",
"mocha": "^3.2.0",
......@@ -26,4 +26,4 @@
"tmp": "0.0.33",
"typescript": "^2.2.2"
}
}
\ No newline at end of file
}
......@@ -5,7 +5,6 @@
import * as fs from 'fs';
import { dirname } from 'path';
var rimraf = require('rimraf');
/**
* Contains methods that are commonly used across test areas.
......@@ -25,28 +24,6 @@ export class Util {
}
}
public rimraf(directory: string): Promise<any> {
return new Promise((res, rej) => {
rimraf(directory, (err) => {
if (err) {
rej(err);
}
res();
});
});
}
public static rimraf(directory: string): Promise<any> {
return new Promise((res, rej) => {
rimraf(directory, (err) => {
if (err) {
rej(err);
}
res();
});
});
}
public static removeFile(filePath: string): void {
try {
fs.unlinkSync(`${filePath}`);
......
......@@ -185,6 +185,10 @@ before(async function () {
await setup();
});
after(async () => {
await new Promise((c, e) => rimraf(testDataPath, { maxBusyTries: 10 }, err => err ? e(err) : c()));
});
// import './areas/workbench/data-migration.test';
import './areas/workbench/data-loss.test';
import './areas/explorer/explorer.test';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册