Resharper 2017 的 Jasmine 单元测试支持状态:支持调试模式和 AMD 模块? [英] State of Jasmine Unit Test support of Resharper 2017: Debug mode and AMD modules supported?

查看:32
本文介绍了Resharper 2017 的 Jasmine 单元测试支持状态:支持调试模式和 AMD 模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用 Chutzpah 来运行和调试包含 AMD/require.js 模块的 Jasmine 单元测试.我想切换到 Resharper 2017 的测试运行器.但是,Resharper 似乎不完全支持 Jasmine 单元测试?

I currently use Chutzpah to run and debug Jasmine Unit tests that include AMD/require.js modules. I would like switch to the test runner of Resharper 2017. However, Resharper does not seem to fully support Jasmine Unit Tests?

A.茉莉花测试示例:

/// <reference path="../../bower_components/requirejs/require.js" />
/// <reference path="../../bower_components/jasmine-core/lib/jasmine-core/jasmine.js" />

describe('dummy example test', function() {
  it("should return bar", function () {
    expect(true).toEqual(true);
  });
});

可以使用 Resharper 运行测试,但禁用调试选项:

The Test can be run with Resharper but the Debugging option is disabled:

B.带有模块定义的示例测试:

B. Example test with module definition:

/// <reference path="../../bower_components/requirejs/require.js" />
/// <reference path="../../bower_components/jasmine-core/lib/jasmine-core/jasmine.js" />

define(['Squire'], function(squire) {

  describe('dummy example test', function() {
    it("should return bar", function() {
      expect(true).toEqual(true);
      alert('has been executed');
    });
  });

});

如果我从 Resharper 开始,测试永远不会结束,并且不会调用 it 方法.

If I start that with Resharper the test never ends and the it method is not called.

Resharper 2016 真的不支持 Jasmine 单元测试的调试,也不支持单元测试使用 AMD 模块吗?或者我是否需要以某种方式调整我的 Resharper 设置以使调试和 AMD/requirejs 模块工作?

Is it true that Resharper 2016 does not yet support the Debugging of Jasmine unit tests and neither the usage of AMD modules with unit tests? Or do I need to somehow adapt my Resharper settings to get Debugging and AMD/requirejs modules to work?

这是我当前的设置:

(由于 Chutzpah 和 Resharper 10 都使用过时的 Jasmine 版本,我也愿意接受与 VisualStudio 良好集成的进一步建议.)

(Since both Chutzpah and Resharper 10 use outdated versions of Jasmine I am also open for further suggestions that integrate well with VisualStudio.)

Resharper 2016 似乎支持 Jasmine 版本 > 2.0.

Resharper 2016 seems to support Jasmine Versions > 2.0.

相关(不是最新的?)文章:

Related (not up to date?) articles:

https://devnet.jetbrains.com/message/5528577

http://www.neovolve.com/2015/01/30/resharper-jasmine-and-requirejs/

Resharper 7 中的 Jasmine 和 Requirejs

如何测试 spa js 模块使用 resharper testr jasmin?

使用 Require 和 Resharper 进行前端 JavaScript 测试

如何调试 Jasmine 测试使用 Resharper?

Resharper 中的茉莉花测试不会停止执行

编辑

这些问题最初是针对 Resharper 10 发布的.它们对 Resharper 2016 仍然有效.

The questions have been originally posted for Resharper 10. They are still valid for Resharper 2016.

推荐答案

截至 ReSharper 2016.1:

As of ReSharper 2016.1:

A.不支持调试 JavaScript 测试.这是功能请求.

A. Debugging JavaScript tests is not supported. Here is the feature request.

B.不支持 AMD.这是相关票证.

B. AMD is not supported. Here is the related ticket.

这篇关于Resharper 2017 的 Jasmine 单元测试支持状态:支持调试模式和 AMD 模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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