eldoy / mokk

Require mocker used (mostly) for testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mokk

Require mocker used (mostly) for testing.

Install

npm i mokk

Usage

var mokk = require('mokk')

// Start mocking 'waveorb'
mokk.start('waveorb', function() {
  var companies = [{ name: 'Firmalisten' }]
  return companies
})

// Stop mocking 'waveorb'
mokk.stop('waveorb')

// Stop all mocking
mokk.stop()

MIT Licensed. Enjoy!

Created by Eldøy Projects

About

Require mocker used (mostly) for testing

License:MIT License


Languages

Language:JavaScript 100.0%