Skip to content

Instantly share code, notes, and snippets.

@rmp135
Last active April 23, 2017 16:50
Show Gist options
  • Save rmp135/4374418e96b399eb99a29cc11a2ec39b to your computer and use it in GitHub Desktop.
Save rmp135/4374418e96b399eb99a29cc11a2ec39b to your computer and use it in GitHub Desktop.
Setting up rewire
import * as rewire from 'rewire'
import * as ToMock from './ToMock'
let RewireToMock = rewire('./ToMock')
const MockToMock: typeof ToMock & typeof RewireToMock = <any> RewireToMock
MockToMock.__set__({
dependency: {}
})
MockToMock.__set__({
dependency_1: {
default: {}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment