In testing of complex examples, it is often needed to perform custom JavaScript code.
For this purposes, there is implemented JavaScript class, which encapsulates the common functionality:
Using new JavaScript(String) constructor or JavaScript.js(String) factory method with same semantics.
from classpath resource - using factory method JavaScript.fromResource(String resourceName)
from file - using factory method JavaScript.fromFile(File)
Using JavaScript#join(JavaScript) method.
Using JavaScript#append(String).
The JavaScript code placeholders (using SimplifiedFormat format) with JavaScript#parametrize(Object...)