diff --git a/.travis.yml b/.travis.yml index c9549444..42ea3f81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ matrix: grep: stable filter_secrets: false # Secrets will otherwise break Windows builds node_js: latest + install: npm install script: npm run test:ava env: diff --git a/test/rollup/rollup.test.ts b/test/rollup/rollup.test.ts index c77c1216..4afbf910 100644 --- a/test/rollup/rollup.test.ts +++ b/test/rollup/rollup.test.ts @@ -27,8 +27,10 @@ test("can be bundled using rollup", async t => { }) ]) - const result = await execa.command("puppet-run --serve ./dist/worker.js:/worker.js ./dist/app.js", { - cwd: __dirname, + const result = await execa.command("puppet-run --serve ./test/rollup/dist/worker.js:/worker.js ./test/rollup/dist/app.js", { + cwd: path.resolve(__dirname, "..", ".."), + localDir: path.resolve(__dirname, "..", ".."), + preferLocal: true, stderr: process.stderr }) t.is(result.exitCode, 0) diff --git a/test/tsconfig/minimal-tsconfig.test.ts b/test/tsconfig/minimal-tsconfig.test.ts index bd1a1a75..eb58c5ae 100644 --- a/test/tsconfig/minimal-tsconfig.test.ts +++ b/test/tsconfig/minimal-tsconfig.test.ts @@ -1,7 +1,12 @@ import test from "ava" import execa from "execa" +import * as path from "path" test("can compile with a minimal TypeScript config", async t => { - const result = await execa("tsc", ["--project", require.resolve("./minimal-tsconfig.json")]) + const result = await execa("tsc", ["--project", require.resolve("./minimal-tsconfig.json")], { + cwd: path.resolve(__dirname, "..", ".."), + localDir: path.resolve(__dirname, "..", ".."), + preferLocal: true + }) t.is(result.exitCode, 0, `tsc exited with non-zero exit code.\nStderr:\n${result.stderr}`) })