JSPM

japa-ts-mock

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q26703F
  • License MIT

A mock library built on top of ts-mockito

Package Exports

  • japa-ts-mock
  • japa-ts-mock/build/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (japa-ts-mock) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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
  }
}