Skip to content

Glossary: Software Design Patterns in JavaScript

Mock

Also written: mocks, mock.fn

A test stand-in that also records how it was called so the test can check it. Node's node:test module can create them with mock.fn().

Where the book teaches it

Related terms

FakeStubnode:test