~/talk

Testing EcmaScript Modules

Talkat OpenJS World 2021 · 2021-06-02..06-03· [javascript, testing]
slides:none on file

Three tools target ESM mocking and testing: lazaretto uses a worker thread and stringified mock functions to load candidate code and allow white‑box checks; mockalicious runs tests inside a worker, injects mocks via a custom loader and implements cache‑busting for file:// imports; loader API experimental remains required, so every run either needs --loader or an autoload worker shim. Coverage with nyc breaks; use c8. Result: workable but fragile and not ready for most production workflows.

AI-written summary · about

  1. 0:00Start
  2. 3:24Dynamic Import
  3. 3:46Ecmascript Modules
  4. 12:15Ecosystem
  5. 17:49Test Libraries and Test Frameworks
  6. 18:48Test Library
  7. 22:38Mocking Dependencies
  8. 26:00Loaders Api
  9. 29:37Worker Threads
  10. 34:52The Api
  11. 39:39Cache Busting
  12. 46:52Tapex
  13. 48:49Is Esm Ready
  14. 51:57Conditional Exports
  15. 52:32Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.