testdouble.js icon indicating copy to clipboard operation
testdouble.js copied to clipboard

A minimal test double library for TDD with JavaScript

Results 59 testdouble.js issues
Sort by recently updated
recently updated
newest added

List of improvements I believe is needed for the TypeScript definition. I have already started working on this list. Love to hear feedback if you have any. - [x] Organize...

When it comes to large codebases, it can be massively beneficial to grab libraries from the root resolution rather than relative path resolution ../../ There is an excellent library to...

Possibly related to #271. ```js const Service = { *send () {}, } td.replace(Service, 'send'); td.when(Service.send()).thenResolve('fake'); ``` Running example: https://runkit.com/albertogasparin/595b9e9a08f4860012b4af3e It works fine in pre 3.2

testdouble.js does not currently support generators. Prior to 3.2, `td.replace` would replace them as it would any other function, but this was accidental in that the resulting functions didn't really...

I was trying to replace the sinon stub with td, but it didn't work with curry functions. Is it supported by td? ``` //in LanguageTranslationHelpersV2 const deserialize = curry((key, data)...

right now, `captor.capture()` matchers are printed out with an ugly toString() in error messages. they should be niceified like the other matchers. currently just got: ```js All calls of the...

enhancement

Starting with the setup work in #255, I've been undergoing an in-place rewrite of testdouble.js that essentially dogfoods both the library & [Discovery Testing](https://github.com/testdouble/contributing-tests/wiki/Discovery-Testing) by replacing the library bit-by-bit. This...

enhancement

I had a depended-on module X that was in a not-requireable state because of a typo in one of its `import` statements. The symptom given to me by TD when...

bug

Worth having a doc that just covers differences in td.js vs sinon, especially where the terminology differs. Like it or not, thousands of people learned the word "spy" from sinon,...