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

CommonJSify sinon.mock #933

Merged
merged 4 commits into from
Nov 30, 2015
Merged

Conversation

jonnyreeves
Copy link
Contributor

Following on from #920 and #932, I've extracted sinon.mock; and just for fun, sinon.assert and createSpyCall into standalone CommonJS modules! 🚀

Notable Changes

  • Extracted sinon.expectation into it's own module, mock-expectation to satisfy the tests and keep the mock module clean. Once the tests are migrated to CommonJS we can remove this from the public API.

Similar to `spy.js`, the tests have a hard dependency on `sinon.format` which can't be removed until the tests themselves are CommonJSify'd
Extract, `sinon.expectation`, an inner module into its own CommonJS module (`mock-expectation`).  This is still exported on the `sinon` object to satisfy tests.
@mantoni
Copy link
Member

mantoni commented Nov 29, 2015

Very nice work, thank you! Especially that you managed to refactor quite a handful, without touching any tests.

fatso83 added a commit that referenced this pull request Nov 30, 2015
@fatso83 fatso83 merged commit ac12b30 into sinonjs:master Nov 30, 2015
@jonnyreeves jonnyreeves deleted the feature/cjsify-mock branch November 30, 2015 20:31
@jonnyreeves jonnyreeves mentioned this pull request Jan 16, 2016
36 tasks
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

Successfully merging this pull request may close these issues.

3 participants