如何使用Jasmine + Resharper引用外部库

Ste*_*ice 8 extjs jasmine resharper-7.1 resharper-8.0

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

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

Eli*_*lka 12

目前的方法似乎是硬编码包含语句作为套件文件中的特殊注释(称为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');
    });
});
Run Code Online (Sandbox Code Playgroud)

请参阅ReSharper社区中的此主题,作为此建议的来源.