As we are looking into the bright future when we will have native module 
support, but how will we test it then? As of now the only way to mock any 
module function, classes or other exports are by way of exploiting the fact
that webpack (or similar) is in the middle.



Things to think about:
- Mocking modules

- Accessing private private fields/ variables (This might be controversial,
but many would love that feature)

- Ability to dispatch "trusted" events (needed for any video/audio or
similar APIs)




I thing that having some kind of `'testing'` mode the same way as we do have
`'strict'` mode might be a way to solve it. The `'testing'` keyword is
ignored unless, it is included via `<script>`, or an other `'testing'`
module.

The closest we have now is puppeteer, but would it be able to do all of it
at reasonable speed? Also how about cross-platform?

What are your thoughts on this topic, have I missed any important hard/
impossible to test thing? Or library that does some woodoo? 
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to