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

Refactor and fix a couple of issues #33

Merged
merged 21 commits into from
Jul 22, 2018

Conversation

mroderick
Copy link
Member

This PR is a follow up to the discussion in sinonjs/referee#29.

It contains the same changes as in the branch mentioned in sinonjs/referee#29, just packaged slightly differently

I've tried to keep each commit focused on just one thing and have tried to give a decent order to the changes, to make it easier to follow.

Main themes

  • Extract functions and their tests into individual files
  • Add some of the tests from the internal deepEqual in sinon in preparation of consolidating everything in samsam
  • Add support for testing with `Error
  • Fix broken tests in IE11
  • Add Prettier for more consistent code
  • Speed up check of cyclic objects by using native indexOf instead of homegrown solution

How to verify - mandatory

  1. Check out this branch
  2. npm install
  3. npm test

Checklist for author

  • npm run lint passes
  • References to standard library functions are cached.

@coveralls
Copy link

coveralls commented Jul 22, 2018

Pull Request Test Coverage Report for Build 140

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 96.325%

Totals Coverage Status
Change from base Build 138: -0.02%
Covered Lines: 188
Relevant Lines: 195

💛 - Coveralls

package.json Outdated
@@ -28,7 +28,9 @@
"lib/",
"!lib/**/*.test.js"
],
"dependencies": {},
"dependencies": {
"array-from": "2.1.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you add this with the exact version number on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a temporary fix, I'll fold it in when we're ready to merge

Copy link
Member

@mantoni mantoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work! Very nice 👍

And use  polyfill, as IE11 doesn't support
IE11 [doesn't support collection arguments][1].

Disabling the check means that linting will pass, when it should not.
Since the aim is to keep this library compatible with IE11, then the tests
should be able to run in IE11.

Instead of disabling the check for use of invalid use `new Set()`,
replace invalid calls to `new Set()` with a helper `createSet()` that
supports collection arguments.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
@mroderick mroderick merged commit be596f6 into sinonjs:master Jul 22, 2018
@mroderick
Copy link
Member Author

Thank you :)

@mroderick mroderick deleted the refactor-and-fix-issues branch July 22, 2018 15:34
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