Skip to content

Commit

Permalink
Set detailed execa() options explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
andywer committed Dec 12, 2019
1 parent 3e7701e commit d73d82d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions test/rollup/rollup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion test/tsconfig/minimal-tsconfig.test.ts
Original file line number Diff line number Diff line change
@@ -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}`)
})

0 comments on commit d73d82d

Please sign in to comment.