Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sinon-restore

cainus177MIT1.0.1

simply adds restoreAll() to sinon

sinon, mock, fake, stub, spy

readme

sinon-restore

This package simply adds restoreAll() to sinon.

Usage:

var sinon = require('sinon-restore');
// use sinon as usual

// restore all fakes when ready...
sinon.restoreAll()

sinon also has sandboxing (http://sinonjs.org/docs/#sandbox) which also solves this problem, but I personally didn't like the syntax.