2017-05-15 8 views
0

で動作するようにモカ、Node.jsのとWebStormを得て、ここが見つかりました:私は、パターンに一致するファイルを実行するように構成を設定しているhttps://www.jetbrains.com/help/webstorm/2017.1/testing-javascript-with-mocha.html#d194239e92トラブルは、私がWebStormとモカをインストールする手順に従ってきたお互い

**/*.spec.js

node interpreter: /usr/bin/node 
working directory:/home/web/app 
mocha package:/home/web/app/node_modules/mocha 

私は、試してみようとしているものの出力であるES6に変換されるTypeScriptで書いています。しかし、私はこのエラーを理解していないので、どこで解決するかを本当に知りません。

"ts-node"が "spec.js"ファイルのみを検索すると考えられる理由はわかりません。私はts-nodeで探しているフォルダが見つからない理由を理解できません。私はts-nodeをアンインストールして2〜3回再インストールしましたが、どちらもフォルダーの後ろにありませんでした...私はどのように進むべきか、この問題を解決するために必要な詳細情報については手がかりがありません。

ご協力いただければ幸いです。私は自分のアプリケーションをテストしたいだけで、これは本当の頭痛であることが判明しています。ここで

は誤りです:

/usr/bin/node /home/web/app/node_modules/mocha/bin/_mocha --ui bdd --reporter /opt/webstorm/ws/plugins/NodeJS/js/mocha-intellij/lib/mochaIntellijReporter.js **/*.spec.js TypeError: The specified path does not exist: /home/web/app/node_modules/ts-node/tests at resolveSync (/home/web/app/node_modules/ts-node/node_modules/tsconfig/src/tsconfig.ts:72:9) at Object.loadSync (/home/web/app/node_modules/ts-node/node_modules/tsconfig/src/tsconfig.ts:140:16) at readConfig (/home/web/app/node_modules/ts-node/src/index.ts:418:18) at Object.register (/home/web/app/node_modules/ts-node/src/index.ts:176:18) at Suite. (/home/web/app/node_modules/ts-node/src/index.spec.ts:190:5) at Object.create (/home/web/app/node_modules/mocha/lib/interfaces/common.js:114:19) at context.describe.context.context (/home/web/app/node_modules/mocha/lib/interfaces/bdd.js:44:27) at Suite. (/home/web/app/node_modules/ts-node/src/index.spec.ts:189:3) at Object.create (/home/web/app/node_modules/mocha/lib/interfaces/common.js:114:19) at context.describe.context.context (/home/web/app/node_modules/mocha/lib/interfaces/bdd.js:44:27) at Object. (/home/web/app/node_modules/ts-node/src/index.spec.ts:13:1) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at /home/web/app/node_modules/mocha/lib/mocha.js:230:27 at Array.forEach (native) at Mocha.loadFiles (/home/web/app/node_modules/mocha/lib/mocha.js:227:14) at Mocha.run (/home/web/app/node_modules/mocha/lib/mocha.js:495:10) at Object. (/home/web/app/node_modules/mocha/bin/_mocha:460:18) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:390:7) at startup (bootstrap_node.js:150:9) at bootstrap_node.js:505:3

Process finished with exit code 1

答えて

0

私は内部テストからのエラーを引き起こして、私のパスはnode_modulesが含まれて私のプロジェクトのルートからだったので、node_modulesディレクトリがテストされていた、それを考え出しましたts-nodeフォルダー。テストモジュール用の指定されたパスからnode_modulesディレクトリを除外するように修正されました。

関連する問題