Skip to content

Commit

Permalink
Fix missing environment in test scripts
Browse files Browse the repository at this point in the history
Was causing the scripts to fail on Linux
  • Loading branch information
dryoma committed Oct 27, 2016
1 parent 2a688b6 commit f480d5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scripts/test-rule.js
Expand Up @@ -2,14 +2,14 @@
// So that we could just run "npm run test-rule partial-no-import"

const exec = require("child_process").exec
const env = process.env
env.FORCE_COLOR = 1

process.argv.slice(2).forEach(function (arg) {
const cmd = "\"./node_modules/.bin/tape\" -r babel-register \"src/rules/" + arg + "/__tests__/index.js\" | \"./node_modules/.bin/tap-spec\""
const child = exec(
cmd,
{ env: { FORCE_COLOR: "always" } }
// We actually don't need this callback now
// function (error, stdout, stderr) {}
env
)

child.stdout.pipe(process.stdout)
Expand Down
6 changes: 3 additions & 3 deletions scripts/test-util.js
Expand Up @@ -2,14 +2,14 @@
// So that we could just run "npm run test-util findCommentsInRaws"

const exec = require("child_process").exec
const env = process.env
env.FORCE_COLOR = 1

process.argv.slice(2).forEach(function (arg) {
const cmd = "\"./node_modules/.bin/tape\" -r babel-register \"src/utils/__tests__/" + arg + ".js\" | \"./node_modules/.bin/tap-spec\""
const child = exec(
cmd,
{ env: { FORCE_COLOR: "always" } }
// We actually don't need this callback now
// function (error, stdout, stderr) {}
env
)

child.stdout.pipe(process.stdout)
Expand Down

0 comments on commit f480d5e

Please sign in to comment.