Created
August 24, 2018 01:40
-
-
Save pavlov99/343d797b80a4fedff9d4228a08067148 to your computer and use it in GitHub Desktop.
Find all *.spec.js testing files in src/ folder and execute with node.js
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 command line executes all test files with NodeJS. | |
# Test files are located in ./src folder and have *.spec.js | |
# In order to use ES6 import/export syntax, reify is required: https://github.com/benjamn/reify | |
# `find` command generates a "test file" which require() every actual test. | |
# If the output is TAP-compatible, one could pipe it to ./node_modules/.bin/tap-mocha-reporter spec | |
node --require reify -e "$(find ./src -name '*\.spec\.js' -type f -exec echo "require('{}');" \; | paste -s -d' ' -)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment