Glossary: Software Design Patterns in JavaScript
Injected clock
Also written: clock
A function passed in that returns the current time as a Date, such as () => new Date(). A test can pass one that always returns the same time.
Glossary: Software Design Patterns in JavaScript
Also written: clock
A function passed in that returns the current time as a Date, such as () => new Date(). A test can pass one that always returns the same time.