Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add i flag to ignore any tests inside node_module directories
- Loading branch information
Showing
6 changed files
with
69 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# gitignore | ||
|
||
/node_modules | ||
!/test/ignore_node_modules/node_modules/ | ||
|
||
# Only apps should have lockfiles | ||
yarn.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
var spawn = require("child_process").spawn; | ||
var path = require("path"); | ||
var testFile = path.join(__dirname, "/ignore_node_modules/**/*.spec.js"); | ||
var bin = path.join(__dirname, "../bin/tape"); | ||
|
||
execute("node", [bin, testFile, "-i"]); | ||
|
||
/** | ||
* execute given command in a node child process | ||
* @param {String} proc - process command name | ||
* @param {[String]} args - array of process arguments | ||
* @return {Promise<any>} | ||
*/ | ||
function execute(proc, args) { | ||
console.info("spawning ", proc, args.join(" ")); | ||
var cmd = spawn(proc, args, { | ||
cwd: path.join(__dirname, ".."), | ||
env: process.env | ||
}); | ||
|
||
cmd.stdout.on("data", function (data) { | ||
console.log(data.toString()); | ||
}); | ||
|
||
cmd.stderr.on("data", function (data) { | ||
console.warn(data.toString()); | ||
}); | ||
|
||
cmd.on("close", function (code) { | ||
console.log('Child exited with code ' + code); | ||
}); | ||
|
||
cmd.on("error", function (code) { | ||
console.error('Error while spawning ' + proc + ' ' + code + ' ' + arguments.join(" ")); | ||
}); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.