UNPKG

testdouble

Version:

A minimal test double library for TDD with JavaScript

14 lines (11 loc) 257 B
import log from '../log' export default function ensureRehearsal (rehearsal) { if (!rehearsal) { log.error('td.when', `\ No test double invocation call detected for \`when()\`. Usage: when(myTestDouble('foo')).thenReturn('bar')\ ` ) } }