Unit suite · 16 cases

Contracts at the class boundary.

Exports, initial state, fluent identity, argument validation, and the public list snapshot.

Complete Unit inventory

16
  1. default and named exports reference the same class
  2. a fresh instance exposes an empty list snapshot
  3. instances own independent event registries
  4. on returns the current instance
  5. once returns the current instance
  6. off returns the current instance when the type is absent
  7. emit returns the current instance when the type is absent
  8. reset returns the current instance
  9. on requires a string event type
  10. on requires a function handler
  11. on requires a boolean once flag
  12. once delegates type validation to on
  13. once delegates handler validation to on
  14. off requires a string event type
  15. off validates a handler when the event exists
  16. emit requires a string event type