2017-09-06 4 views
1

터미널에서 직접 다음 명령을 실행하면 233 개의 테스트가 실행되는 것을 알 수 있습니다.npm 스크립트에서 이스탄불을 실행하지 못함 테스트

./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register --require ./coffee-coverage-loader.js --require lib/bootstrap.coffee test/lib/**/*.coffee

그러나, 나는 내 package.json 같은에서 스크립트로한다는 설정 한 경우 :

"coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register --require ./coffee-coverage-loader.js --require lib/bootstrap.coffee test/lib/**/*.coffee"

실행 npm run coverage가 난 단지 74 개 테스트를 실행 한 것을 알 수있다.

내 테스트는 test/lib/**/*.coffee입니다.

npm을 통해 명령을 실행하면 더 적은 테스트가 실행되는 이유는 무엇입니까? 내가 가진 이유는 확실하지 않다

"coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register --require ./coffee-coverage-loader.js --require lib/bootstrap.coffee './test/lib/**/*.coffee'"

:

나는 실행되지 않은 테스트는 npm 스크립트에 글로브 패턴 주위에 따옴표를 추가하여 고정 test/lib/*/*/*.coffee

답변

0

에있는 것으로 나타났습니다 그래도 작동하도록하려면 ./test/lib/**/*.coffee을 따옴표로 묶으십시오.