Currently, this module depends on node-clock. It may or may not share it's clock instance with consuming apps.
When this module installs its own clock instance, clock.now() will not be stubbed in consuming app specs.
Options include:
- Enforce clock singleton using globals, a la node-fibers
- Pass the clock into a module config method, a la goodeggs-emailer.
- Don't call clock.now() within formatters, instead pass in base time to methods that do relative time formatting.
I lean towards option 3, but it's the biggest interface change.
Currently, this module depends on
node-clock. It may or may not share it's clock instance with consuming apps.When this module installs its own clock instance,
clock.now()will not be stubbed in consuming app specs.Options include:
I lean towards option 3, but it's the biggest interface change.