Я пытаюсь пройти учебное пособие по реагированию/сокращению, и я столкнулся с ошибкой, когда дело доходит до запуска модульных тестов с моккой.Запуск Mocha на windows для теста jsx
Когда я запускаю 'npm run test', я получаю следующую ошибку (которая, как я подозреваю, связана с пути или расширениями .jsx).
17 error Windows_NT 6.3.9600
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xenoputtss\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
19 error node v5.1.0
20 error npm v3.4.1
21 error code ELIFECYCLE
22 error [email protected] test: `mocha --compilers js:babel-core/register --require ./test/test_helper.js 'test/**/*[email protected](js|jsx)'`
22 error Exit status 255
23 error Failed at the [email protected] test script 'mocha --compilers js:babel-core/register --require ./test/test_helper.js 'test/**/*[email protected](js|jsx)''.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the voting-client package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error mocha --compilers js:babel-core/register --require ./test/test_helper.js 'test/**/*[email protected](js|jsx)'
23 error You can get their info via:
23 error npm owner ls voting-client
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
мой пакет.json устанавливается так, как это для скриптов.
"scripts": {
"test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js 'test/**/*[email protected](js|jsx)'",
"test:watch": "npm run test -- --watch"
},
Мне нравится идея, но мне не удобно устанавливать другую оболочку, чтобы получить тест на работу. Я должен, вероятно, посмотреть, как работает globbing в этом сценарии. – XenoPuTtSs