extjs - 你如何使用 Jasmine + Resharper 引用外部库

标签 extjs jasmine resharper-7.1 resharper-8.0

我可以从 Resharper 8.0 单元测试运行器运行 Jasmine 单元测试。
我有一个问题,通常在 html 页面中的任何 Javascript 引用(即在我的情况下为 Ext-Js)然后我无法使用 Resharper 测试运行器,因为您似乎无法访问 Resharper 的 HTML 页面使用。 (我假设它是因为我在磁盘上找不到它而生成的)

我在想是否有办法直接从 Javascript 测试文件而不是通过 html 页面调用或加载外部库引用,然后我可以让它工作。我还没有发现 Javascript(或 Ext-Js)是否可行。

最佳答案

目前似乎要走的路是硬编码 include 语句作为套件文件中的特殊注释(称为 doc-comments 引用),例如:

// include external files like so:
/// <reference path="/path/to/external-file.js" />

// than write your testing suite as usual:
describe('a silly suite', function() {
    it('should test something is happening', function() {
        expect(something).toBe('happening');
    });
});

this thread on the ReSharper community ,作为此建议的来源。

关于extjs - 你如何使用 Jasmine + Resharper 引用外部库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17871447/

相关文章:

javascript - 使用Ext js动态加载项目 "loader"

extjs - 如何在 Ext.formPanel 中隐藏标题

angularjs - 使用 Firefox 或 Safari 在 Protractor 中进行 E2E 测试?

c# - ReSharper "Cannot resolve symbol"即使在项目构建时

extjs - 如何将GeoExt3添加到Extjs 6 MVVM体系结构?

extjs - 在 ExtJs 3.3.1 中,如何在不单击 EditorGrid 的情况下显示 ComboBox 下拉列表?

Angular 9 "Error: This constructor was not compatible with Dependency Injection."

gruntjs - 配置 jasmine-jquery 以使用 Karma

visual-studio-2010 - 为仅可用作键盘快捷键的命令添加 Visual Studio 工具栏按钮

c# - Resharper 不允许我将静态方法重构为实例方法