Scala Project - Node Testing

I have a scala project that once it builds I want to run some API/UI tests using .js frameworks - like casper. Obviously I want the build to fail if it fails it’s scala unit tests, the npm API tests and/or UI tests. How do I set this up? Would this require a custom docker image?