Expect toNotBe () undefined is not a function

This code:

expect (X) .toNotBe (Y);

Brings me back:

TypeError: undefined is not a function

Jasmine Version 2.0.3

Do you know where I should look?

+7
javascript angularjs jasmine
source share
2 answers

It should be:

expect(X).not.toBe(Y); 
+21
source share

You have to use

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

Read this jasmine introduction

+3
source share

All Articles