Making the Test Pass
Learn how to make the test pass and add jQuery methods to the test.
JavaScript environment
In this section, we’ll set up the JavaScript and present some passing code without unit testing. In the next chapter, we’ll set up JavaScript unit-testing tools and see how we might test-drive JavaScript features.
Rails 5.1 made two important changes to the JavaScript environment:
- jQuery is no longer a default dependency.
- Webpack integration is available via the Webpacker gem.
Webpack is an optional replacement for the Rails asset pipeline and has the same general purpose. It takes files that might be written in JavaScript, ...