January 2018
Beginner
658 pages
13h 10m
English
To create the bogus test, we'll make a new test using the it callback function:
it('should expect some values');
We can put whatever we want in here, it's not too important. And we'll pass in an arrow function (=>) as our callback function:
it('should expect some values', () => {});
Now as we've seen already, one of the most fundamental assertions you'll make is you're just going to check for equality. We want to check if something like the response variable equals something else, like the number 44. Inside expect, we can also do the opposite. We can expect that a value like 12 does not equal, using toNotBe. And then we can assert that it doesn't equal some other value, like 11:
it('should expect ...Read now
Unlock full access