Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sinon as peer dependency #136

Open
laleksiunas opened this issue Nov 6, 2020 · 0 comments
Open

Use sinon as peer dependency #136

laleksiunas opened this issue Nov 6, 2020 · 0 comments

Comments

@laleksiunas
Copy link

Currently, sinon is added as a dependency in the package.json. Such package managing causes issues due to two sinon instances running in an end-user project (sinon instance in ts-sinon library and sinon itself in the end-user projects). For example, stubbing class methods using ts-sinon stubConstructor and later on using withArgs(sinon.match(someObject)) function from sinon package does not work correctly due to sinon instances conflicts - methods are not called when they should be. The issue gets fixed when I move this library's code directly to my project and use my sinon instance.
So proposed solution would be to move sinon and its dependencies to peer dependencies list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant