1.0.0 • Published 4 years ago
mocku v1.0.0
mocku
Mocking library.
Install
$ yarn add --dev mocku
Usage
import { mock, deleteFromCache } from 'mocku'
const unmock = mock('./file', {
'./file2': {
default: 'file2'
},
fs: {
readFile: 'readFile'
}
})
import('./file')
.then(console.log)
.then(() => {
unmock()
return import('./file')
})
.then(console.log)
.catch(console.error)