【问题标题】:Jasmine SpyOn Test is not workingJasmine SpyOn 测试不工作
【发布时间】:2013-05-29 07:34:26
【问题描述】:

我将 Jasmine-Species 和 jasmine 一起用于 GWT

我写了一个看起来像这样的测试

feature('checking spy', function() {

summary(
    'In order to check how spy work ',
    'I should have a class on which i can work '
    );
scenario('Spy should tell me function is called or not ', function() {

    given('A Class to work on ', function() {
        window.signInObj = new SignIn();

    });
    when('I Spy on a function and call it ', function() {

        spyOn(signInObj, "fillForm");
        signInObj.fillForm("world",'hello');

    });
    then('Spy Should tell me that function is called or not', function() {
        expect(signInObj.fillForm).toHaveBeenCalled();
    });

});
});

当我尝试在测试资源管理器中运行这个测试时,它给了我这个

Test adapter sent back a result for an unknown test case. Ignoring result for 'Feature: checking spy Scenario: Spy should tell me function is called or not '.

是我的测试有问题还是有什么问题

提前致谢。

【问题讨论】:

    标签: javascript unit-testing bdd jasmine


    【解决方案1】:

    这是 Visual Studio 重新启动时的问题。它会自动修复所有问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-28
      • 2020-04-08
      • 2017-09-15
      • 1970-01-01
      • 2019-07-11
      • 2020-04-10
      • 1970-01-01
      相关资源
      最近更新 更多