How to use the ts-mock-imports.ImportMock.mockClass function in ts-mock-imports

To help you get started, we’ve selected a few ts-mock-imports examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pact-foundation / pact-js / src / httpPact.spec.ts View on Github external
before(() => {
    // Stub out pact-node
    const manager = ImportMock.mockClass(serviceFactory, "createServer") as any
    manager.mock("createServer", () => {})
  })

ts-mock-imports

Intuitive mocking for Typescript class imports

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis