Regression suite · 43 cases

Pressure on the hard edges.

Live mutation, per-registration one-shot state, reentrant emits, safe object-like event names, snapshot isolation, frozen handlers, and thrown errors.

Complete Regression inventory

43
  1. __proto__ is a safe event name
  2. constructor is a safe event name
  3. toString is a safe event name
  4. hasOwnProperty is a safe event name
  5. numeric-looking event names remain strings
  6. the wildcard symbol description remains an exact typed event
  7. off compares the remove-all handler sentinel strictly
  8. emitting the literal wildcard type invokes wildcard handlers once
  9. handlers added during typed dispatch run in that emit
  10. typed handlers added by a wildcard run in that emit
  11. wildcard handlers added during wildcard dispatch run in that emit
  12. handlers removed during dispatch do not run later in that dispatch
  13. a wildcard can remove a typed handler before the typed phase
  14. reset during typed dispatch leaves the active array running
  15. reset from a wildcard finishes that array but prevents typed dispatch
  16. once is removed before a reentrant emit
  17. persistent reentrant emits preserve nested registration order
  18. wildcard once is removed before a reentrant emit
  19. a throwing once handler remains removed
  20. a throwing once handler is absent from the next list snapshot
  21. a throwing persistent handler remains registered
  22. a thrown wildcard handler stops typed dispatch
  23. off with a nonmatching function preserves the type
  24. off ignores an invalid handler when the type is absent
  25. mutating a list array does not change the registry
  26. deleting a list property does not change the registry
  27. mutating a wildcard list snapshot does not change the registry
  28. frozen handler functions can be registered
  29. nonextensible handler functions can be registered
  30. duplicate once registrations each run once
  31. the same handler can be wildcard-once and typed-persistent
  32. registration does not write the old once symbol onto handlers
  33. the same handler can be once and persistent in one bucket
  34. the same handler has independent state across instances
  35. typed once removal does not skip the next registration
  36. wildcard once removal does not skip the next registration
  37. a sole once handler can add a handler to its live bucket
  38. off all during dispatch leaves the active array running
  39. stale once cleanup cannot delete a fresh same-name bucket
  40. an earlier once remains consumed when a later handler throws
  41. persistent self-removal preserves shifted-array iteration
  42. wildcard-only emits remain chainable
  43. reset instances accept new registrations immediately