Errata

JavaScript Testing with Jasmine

Errata for JavaScript Testing with Jasmine

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page 5
4th paragraph

Concerning corrected URL for link on page 5 "Start by downloading the latest standalone release of Jasmine."

---

The "corrected" link:

https://github.com/pivotal/jasmine/tree/master/dist

appears to get redirected to this URL:

https://github.com/jasmine/jasmine/tree/master/dist

which results in Error 404: This is not the web page you are looking for.

Jeremy French  Jul 13, 2015 
ePub Page 22
"Custom Matchers", second sentence

Sentence reads "You must add the matcher before every spec in which you want it, you must add it."

That's redundant, I suggest deleting the last clause.

Steve Clason  Apr 25, 2013 
ePub Page 27
second sentence

Sentence begins "We want to ability to check...".

Should be "We want THE ability to check..."

Steve Clason  Apr 25, 2013 
Printed Page 28
last paragraph

"...you want to make sure that +person. +pass[<phrase role=keep-together><literal>sayHelloWorld</literal></phrase>] is called with..."

should be

"...you want to make sure that person.sayHelloWorld() is called with..."

Dave Riddle  Apr 19, 2013 
Printed Page 29
2nd describe block

spyOn(dictionary, "hello"); // replace hello function with a spy
spyOn(dictionary, "world"); // replace world function with another spy

should be

spyOn(dictionary, "hello").andCallThrough(); // replace hello function with a spy
spyOn(dictionary, "world").andCallThrough(); // replace world function with another spy

Dave Riddle  Apr 19, 2013 
Printed Page 29
3rd code block

This section is about how to use "andCallThrough" but the code sample does not show it.

I think that this line:
spyOn(dictionary, "hello"); // ...
should be
spyOn(dictionary, "hello").and.callThrough(); // ...

Also, in other parts of Chapter 6 (pg 30)
andReturn("bonjour")
should this be
and.returnValue('bonjour")
???

and similarly with ".andCallFake" ?

I'm pretty new to Jasmine, so maybe the book (pub 2013) has old versions of these methods.

Timothy Helck  Sep 03, 2021 
Printed Page 35
in Asynchronous Tests with jasmine-node

first line of example is:

"it("does an asynchronous call", function() {"

and appears based on:

https://github.com/mhevery/jasmine-node#async-tests

that it should be:

"it("does an asynchronous call", function(done) {"

which changes the behavior of the 4th line of the example.

Anonymous  Feb 06, 2014