我可以从 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/