May 2017
Intermediate to advanced
370 pages
8h 6m
English
So far, we’ve used Spock exclusively to test Java code. One of the reasons all of the examples in the book use Java is that I want to stress that Spock is able to test more than just Groovy. However, Java is not the only other language that we can test using Spock.
In this chapter, we take a brief look at testing JavaScript using Spock. We’ll use the Nashorn script engine (introduced in Java 8) to evaluate JavaScript and invoke it from Spock.
Why would we want to test JavaScript code from the JVM when JavaScript has its own rich suite of ...
Read now
Unlock full access