我设置了一个简单的规范:
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.
似乎正在运行规范...它似乎知道什么'描述'并且'它'是的,但它似乎没有意识到'期待'?
有什么想法吗?