Rxjs Mocha测试不会在WebStorm上运行

Rxjs Mocha测试不会在WebStorm上运行,rxjs,mocha.js,webstorm,Rxjs,Mocha.js,Webstorm,我一直在尝试从WebStorm IDE上的rxjs存储库运行规范测试 https://github.com/ReactiveX/rxjs.git 问题是我可以使用包含的脚本运行测试,也可以通过命令行手动运行测试,但是配置WebStorm不起作用 下面是我最常收到的错误消息。我已经包括了摩卡的默认opts文件,下面是结果 ReferenceError: asDiagram is not defined at Suite.<anonymous> (/Users/test/Des

我一直在尝试从WebStorm IDE上的rxjs存储库运行规范测试

https://github.com/ReactiveX/rxjs.git
问题是我可以使用包含的脚本运行测试,也可以通过命令行手动运行测试,但是配置WebStorm不起作用

下面是我最常收到的错误消息。我已经包括了摩卡的默认opts文件,下面是结果

ReferenceError: asDiagram is not defined
    at Suite.<anonymous> (/Users/test/Desktop/Test/rxjs/spec/Observable-spec.ts:636:3)
    at Object.create (/Users/test/Desktop/Test/rxjs/node_modules/mocha/lib/interfaces/common.js:112:19)
    at context.describe.context.context (/Users/test/Desktop/Test/rxjs/node_modules/mocha/lib/interfaces/bdd.js:44:27)
    at Object.<anonymous> (/Users/test/Desktop/Test/rxjs/spec/Observable-spec.ts:635:1)
    at Module._compile (module.js:652:30)
    at Module.m._compile (/Users/test/Desktop/Test/rxjs/node_modules/ts-node/src/index.ts:430:23)
    at Module._extensions..js (module.js:663:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/test/Desktop/Test/rxjs/node_modules/ts-node/src/index.ts:433:12)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
ReferenceError:未定义asDiagram
在套房。(/Users/test/Desktop/test/rxjs/spec/Observable-spec.ts:636:3)
在Object.create(/Users/test/Desktop/test/rxjs/node_modules/mocha/lib/interfaces/common.js:112:19)
位于context.descripe.context.context(/Users/test/Desktop/test/rxjs/node_modules/mocha/lib/interfaces/bdd.js:44:27)
反对。(/Users/test/Desktop/test/rxjs/spec/Observable-spec.ts:635:1)
编译(Module.js:652:30)
在Module.m._compile(/Users/test/Desktop/test/rxjs/node_modules/ts node/src/index.ts:430:23)
at Module._extensions..js(Module.js:663:10)
at Object.require.extensions.(匿名函数)[as.ts](/Users/test/Desktop/test/rxjs/node_modules/ts node/src/index.ts:433:12)
在Module.load(Module.js:565:32)
在tryModuleLoad时(module.js:505:12)
在Function.Module.\u加载(Module.js:497:3)
at Module.require(Module.js:596:17)

出现问题的原因是Webstorm将
--ui bdd
传递给mocha,覆盖了
规范/support/default.opts中指定的自定义ui。要解决此问题,您必须将摩卡中的用户界面:选项从默认(
bdd
)更改为自定义(
spec/helpers/testScheduler ui.ts
)-字段可编辑,您可以键入/粘贴该值。适合我的配置:


出现问题的原因是Webstorm将
--ui bdd
传递给mocha,覆盖了
规范/support/default.opts中指定的自定义ui。要解决此问题,您必须将摩卡中的用户界面:选项从默认(
bdd
)更改为自定义(
spec/helpers/testScheduler ui.ts
)-字段可编辑,您可以键入/粘贴该值。适合我的配置:


这很有效,谢谢。顺便说一句,您能够让调试开始工作。这对我不起作用。嗯。。它只是工作(使用上面的配置)-我在
spec/Observable-spec.ts
中添加了一对断点,选择了运行配置并按下了调试-一段时间后,断点成功命中:)测试实例化在第一次运行时花费了相当长的时间,但在下一次尝试中运行流畅。请告诉我您正在运行哪个版本的webstorm和node?2018.1.5、2018.2 EAP;Node.js 8.10.0成功了,谢谢。顺便说一句,您能够让调试开始工作。这对我不起作用。嗯。。它只是工作(使用上面的配置)-我在
spec/Observable-spec.ts
中添加了一对断点,选择了运行配置并按下了调试-一段时间后,断点成功命中:)测试实例化在第一次运行时花费了相当长的时间,但在下一次尝试中运行流畅。请告诉我您正在运行哪个版本的webstorm和node?2018.1.5、2018.2 EAP;Node.js 8.10.0