Jasmine单元测试超时 - ReferenceError:未定义jasmineRequire [英] Jasmine unit test timing out - ReferenceError: jasmineRequire is not defined

查看:240
本文介绍了Jasmine单元测试超时 - ReferenceError:未定义jasmineRequire的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很少有由Resharper 2016.3运行的茉莉花单元测试,但突然所有测试都被忽略:任务在超时时被跳过。



我无法弄清楚导致此行为的原因。到目前为止我所知道的由于某些原因Resharper测试运行器找不到jasmineRequire.html = function(j $){...jasmineRequire的定义,看起来这个文件被包装在Resharper的某个地方。



有人可以提供帮助吗?



编辑



<我运行了一个比较测试,相同的代码与R#2016.2.1,jasmine版本2.4和所有茉莉花单元测试通过。但R#2016.3与任何版本的jasmine都给出了上述错误。

解决方案

我使用Resharper提出了这个问题并提供了解决方案如下



https:// youtrack .jetbrains.com / issue / RSRP-462494



将包含名称Jasmine-Something.js的所有自定义文件重命名为JasmineSomething.js。


I have few jasmine unit test that are run by Resharper 2016.3, but suddenly all tests are "Ignored : Task skipped on timeout".

I cannot figure out what is causing this behaviour. All I know so far that for some reason Resharper test runner cannot find definition for "jasmineRequire.html = function(j$) {..." jasmineRequire, and it looks like this file is wrapped inside Resharper somewhere.

Can somebody help?

EDIT

I ran a comparison test, same code with R# 2016.2.1, jasmine version 2.4 and all jasmine unit tests passed. But R# 2016.3 with any version of jasmine give the error above.

解决方案

I raised this issue with Resharper and the solution is provided as follows

https://youtrack.jetbrains.com/issue/RSRP-462494

Rename any custom files that contains name "Jasmine-Something.js" to "JasmineSomething.js".

这篇关于Jasmine单元测试超时 - ReferenceError:未定义jasmineRequire的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆