Ability to run unit tests against unbundled source files instead of bundled files
See original GitHub issueI’m submitting a feature request
- Library Version: 0.19.0
Please tell us about your environment:
-
Operating System: Windows 10
-
Node Version: 4.2.4
-
NPM Version: 3.9.5
-
Browser: all
-
Language: all
Current behavior:
Currently when running au test
or au test --watch
, the tests are being run against the bundled code.
Expected/desired behavior:
- What is the expected behavior? to be able run tests against transpiled source code instead of bundled code
- What is the motivation / use case for changing the behavior? Currently, running the tests against the bundles is causing us to have to manually rebuild every time we make a change to the source files that we are testing. Also makes debugging a bit harder, since we are only seeing the transpiled, bundled code in the browser when running tests. Being able to test against the source code without bundling would improve this workflow.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:19 (17 by maintainers)
Top Results From Across the Web
Run tests against compiled bundles - javascript - Stack Overflow
My unit tests cover my source code and I trust my bundling/compiling tools to generate working bundles. Then I read this enlightening post...
Read more >Browser module loading - can we stop bundling yet? - sgom.es
I'm Sérgio, and I work with Web frontend code. Sometimes I write about it here.
Read more >Comparing the New Generation of Build Tools - CSS-Tricks
By default, Snowpack's build step doesn't bundle files into a single package but provides unbundled esmodules that run in the browser. esbuild ...
Read more >Is Vite Better than Webpack? - Bits and Pieces
Webpack is a bundler-based build tool, which means that to serve your application, it needs to crawl, process, and concatenate your ...
Read more >Testing best practices - GitLab Documentation
When using spring and guard together, use SPRING=1 bundle exec guard instead to make use of spring. Eager loading the application code. By...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The benefit of having that external config file is that we can have some finer control of what files are loaded and how in situations that aren’t for production (such as various testing libraries). In our particular set up, we’re not wanting to run tests off of bundled code, but rather the source code. Currently, that requires requireJS to be configured, but that config file isn’t generated except by bundling code, and even then it’s put inside the bundle itself.
@Jenselme, if you’re interested, I made a repo with the CLI and added modifications/notes on how to run TDD. It is dependent on getting the next version where you can externally configure the loader, but hopefully that gets deployed tomorrow. https://github.com/AStoker/Aurelia-TDD