1.0.1 • Published 2 years ago

japa-ts-mock v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

japa-ts-mock

A mock library built on top of ts-mockito

Installation

Install package from npm registry

npm i japa-ts-mock

Usage

You can use this plugin with the @japa/runner.

import { mocker } from 'japa-ts-mock'
import { configure } from '@japa/runner'

configure({
  plugins: [mocker()]
})

In japa-types.ts write this:

import { mocker } from 'japa-ts-mock'

declare module '@japa/runner' {
  interface TestContext {
    mocker: Mocker
  }
}