Better support for testing from engines
akxe at seznam.cz
Mon Jul 1 17:56:26 UTC 2019
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
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'`
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss