UNPKG

node-red-contrib-mysensors

Version:

Mysensors related nodes, for decoding / encoding mysensors serial protocol and MQTT topic, and wrapping arbitrary messages into mysensors compatible messages

22 lines (16 loc) 442 B
import { createSandbox } from 'sinon'; import type { InstalledClock } from '@sinonjs/fake-timers'; import * as fakeTimers from '@sinonjs/fake-timers'; const clock: InstalledClock = fakeTimers.install(); export const useSinonSandbox = () => { const sandbox = createSandbox(); afterEach(() => { sandbox.restore(); }); return { ...sandbox, get clock() { return clock; } }; };