This package has been deprecated

Author message:

Deprecated in favor of https://github.com/nextools/metarepo/tree/master/packages/mock/require

mocku
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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)

Package Sidebar

Install

npm i mocku

Weekly Downloads

35

Version

1.0.0

License

MIT

Unpacked Size

4.7 kB

Total Files

5

Last publish

Collaborators

  • fosimus
  • psxcode
  • deepsweet