add chai-spies to registry#545
Conversation
That's because you removed
In this case, if you want to do that, copy |
|
btw, I seriously need to rework |
|
If it is fixed, I suspect you can just |
|
@unional thanks for the quick response! On the module errors - it turns out the problem was that I managed to forget to add the actual test file to the test directory's tsconfig. D'oh! And cool, the source-tests make a lot of sense then! I ported the (nicely extensive) tests over from chai-spies, which found a bunch of missing stuff in my definitions, so that was helpful. As for fixing the npm-chai definition - sure, I should have time to take a crack at it tomorrow. Hopefully I can find a way of switching this https://github.com/typed-typings/npm-chai/blob/master/lib/Chai.d.ts#L10 to an interface without breaking the other chai plugin definitions in the registry... |
|
Those Can do the same on |
|
I'm going to merge this PR for now. If we can clean up Also, |
Typings URL: https://github.com/whenther/typed-chai-spies
Questions (for new typings):
index.js<->index.d.ts)?I took a crack at typing the chai-spies library, but ran into a couple problems:
chai.spy()function to the corechaiobject - but in trying to add that to the type definition, I'm running into theModule augmentation cannot introduce new names into the top level scope.error from this issue. That's allowed on TS 1.9, so this works ontypescript@next, but not on the stable channel. Is there a workaround that I don't know about?cannot find moduleerrors intest/test.ts, even though when I import myindex.d.tsinto the project I'm using chai-spies in, everything is a-okay.cannot find moduleissue sorted, I'd like to write some tests - but what's the difference betweentestandsource-test?Thanks!