最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Expect toNotBe() is undefined is not a function - Stack Overflow

programmeradmin1浏览0评论

This code:

expect(X).toNotBe(Y);

Returns me:

TypeError: undefined is not a function

Jasmine version is 2.0.3

Do you know where should i look into?

This code:

expect(X).toNotBe(Y);

Returns me:

TypeError: undefined is not a function

Jasmine version is 2.0.3

Do you know where should i look into?

Share Improve this question asked Mar 4, 2015 at 14:38 Jerome AnsiaJerome Ansia 6,88411 gold badges55 silver badges100 bronze badges 2
  • 25 toNotBe or not.toBe? That is the question. – Barney Commented Mar 4, 2015 at 14:39
  • 3 @Barney Ah! I really LOLed at that one =P – Tivie Commented Mar 4, 2015 at 14:40
Add a comment  | 

2 Answers 2

Reset to default 35

It should be:

expect(X).not.toBe(Y);

You should use

expect(X).not.toBe(Y);

Read this Jasmine introduction

发布评论

评论列表(0)

  1. 暂无评论