diff --git a/package.json b/package.json index bed7f9ab16..9bb0b1fa78 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,7 @@ "description": "Generate .docx documents with JavaScript (formerly Office-Clippy)", "main": "build/index.js", "scripts": { - "pretest": "rimraf ./build-tests && tsc -p ./test-tsconfig.json", - "test": "mocha ./build-tests --recursive", + "test": "mocha-webpack \"src/**/*.ts\"", "prepublishOnly": "npm run build", "lint": "tslint --project .", "build": "npm run webpack", @@ -58,6 +57,7 @@ "awesome-typescript-loader": "^3.4.1", "chai": "^3.5.0", "mocha": "^3.2.0", + "mocha-webpack": "^1.0.1", "prompt": "^1.0.0", "rimraf": "^2.5.2", "shelljs": "^0.7.7", diff --git a/src/export/packer/local.spec.ts b/src/export/packer/local.spec.ts index 1f28f47874..39a721195d 100644 --- a/src/export/packer/local.spec.ts +++ b/src/export/packer/local.spec.ts @@ -26,8 +26,8 @@ describe("LocalPacker", () => { describe("#pack()", () => { it("should create a standard docx file", async function () { this.timeout(99999999); - await packer.pack("build-tests/tests/test"); - fs.statSync("build-tests/tests/test.docx"); + await packer.pack("build/tests/test"); + fs.statSync("build/tests/test.docx"); }); }); @@ -35,8 +35,8 @@ describe("LocalPacker", () => { it("should create a standard PDF file", async function () { this.timeout(99999999); - await packer.packPdf("build-tests/tests/pdf-test"); - fs.statSync("build-tests/tests/pdf-test.pdf"); + await packer.packPdf("build/tests/pdf-test"); + fs.statSync("build/tests/pdf-test.pdf"); }); }); }); diff --git a/test-tsconfig.json b/test-tsconfig.json deleted file mode 100644 index 606934f43c..0000000000 --- a/test-tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "target": "es6", - "strictNullChecks": true, - "sourceMap": true, - "removeComments": true, - "preserveConstEnums": true, - "outDir": "./build-tests", - "sourceRoot": "./src", - "rootDir": "./src", - "module": "commonjs", - "noUnusedLocals": true - }, - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ], - "exclude": [ - "node_modules" - ] -}