Why doesn't Webpacker use my test config when I run Rails tests? - rossta.net

23-Jul-2020 1406
When running Rails system or integration tests, you might be surprised to learn that Webpacker will load your development webpack config. Here's something you might not expect: when running Rails tests, Webpacker will load the development webpack config instead of the test config by default.To demonstrate, I'll use some "puts" debugging. Here's a console.log statement in the development config.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle