nodejs jasmine test在' expect' | '未定义'不是一个功能(评估'期望(真实).toBe(真实)')

时间:2015-08-08 11:55:40

标签: node.js grunt-contrib-jasmine

我设置了一个简单的规范:

describe("A suite", function() {
  it("contains spec with an expectation", function() {
    expect(true).toBe(true);
  });
});

当我跑grunt jasmine时,我得到:

Running "jasmine:src" (jasmine) task
Testing jasmine specs via PhantomJS

 A suite
   × contains spec with an expectation
     TypeError: 'undefined' is not a function (evaluating 'expect(true).toBe(tru
e)') in file:///C:/Users/long-path-to-spec/testing-spec.js (line 4) (1)


1 spec in 0s.
>> 1 failures
Warning: Task "jasmine:src" failed. Use --force to continue.

Aborted due to warnings.

似乎正在运行规范...它似乎知道什么'描述'并且'它'是的,但它似乎没有意识到'期待'?

有什么想法吗?

0 个答案:

没有答案