Skip to content

Test case for demonstrating an issue using Sinon with ts-node and Mocha

Notifications You must be signed in to change notification settings

aendra-rininsland/tsnode-mocha-sinon-test-case

Repository files navigation

Bug Demonstration: ts-node#365

This demonstrates the issue discussed in ts-node#365, namely that Sinon breaks whatever test suite it's used in, without error.

  1. Installation
$ npm install
  1. Run using ts-node
$ npm test

This should report:

stubbing aModule
  normal behaviour
    ✓ returns herpa-derpa
  stubbed behaviour
    1) "before each" hook for "returns boo-urns"
    2) "after each" hook for "returns boo-urns"


1 passing (23ms)
2 failing
  1. Transpile and run as vanilla NodeJS
$ npm run test-js

This should report:

stubbing aModule
  normal behaviour
    ✓ returns herpa-derpa
  stubbed behaviour
    ✓ returns boo-urns


2 passing (18ms)

About

Test case for demonstrating an issue using Sinon with ts-node and Mocha

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published