Comments (3)
2) deepEqual
return false if empty object to empty instance:
AssertionError: [assert.isFalse] Expected true to be false
at referee.fail (node_modules/@sinonjs/referee/lib/referee.js:194)
at ctx.fail (node_modules/@sinonjs/referee/lib/referee.js:84)
at assertion (node_modules/@sinonjs/referee/lib/referee.js:92)
at referee[type][name] (node_modules/@sinonjs/referee/lib/referee.js:112)
at Anonymous function (lib/deep-equal.test.js:423)
4) getClassName
returns the class name of an instance:
AssertionError: [assert.equals] undefined expected to be equal to TestClass
at referee.fail (node_modules/@sinonjs/referee/lib/referee.js:194)
at ctx.fail (node_modules/@sinonjs/referee/lib/referee.js:84)
at assertion (node_modules/@sinonjs/referee/lib/referee.js:92)
at referee[type][name] (node_modules/@sinonjs/referee/lib/referee.js:112)
at Anonymous function (lib/get-class-name.test.js:14)
5) getClassName
returns 'Object' for {}:
AssertionError: [assert.equals] undefined expected to be equal to Object
at referee.fail (node_modules/@sinonjs/referee/lib/referee.js:194)
at ctx.fail (node_modules/@sinonjs/referee/lib/referee.js:84)
at assertion (node_modules/@sinonjs/referee/lib/referee.js:92)
at referee[type][name] (node_modules/@sinonjs/referee/lib/referee.js:112)
at Anonymous function (lib/get-class-name.test.js:19)
Again MDN demystifies. The name
property is not supported in IE 11
from samsam.
This has been fixed in #43 which was published as @sinonjs/[email protected]
from samsam.
1) deepEqual
returns false unequal errors:
AssertionError: [assert.isFalse] Expected true to be false
at referee.fail (node_modules/@sinonjs/referee/lib/referee.js:194)
at ctx.fail (node_modules/@sinonjs/referee/lib/referee.js:84)
at assertion (node_modules/@sinonjs/referee/lib/referee.js:92)
at referee[type][name] (node_modules/@sinonjs/referee/lib/referee.js:112)
at Anonymous function (lib/deep-equal.test.js:318)
When checking Error
objects with deepEqual
, we compare their stacks.
error1.stack === error2.stack
There is a note in MDN regarding the stack
property:
Different browsers set this value at different times. For example, Firefox sets it when creating an Error object, while PhantomJS sets it only when throwing the Error, and MSDN docs also seem to match the PhantomJS implementation.
Since we create the error objects in the test but never throw them, their stack
property is undefined
, I guess and therefore they are equal in IE 11.
As a solution we could check if the properties name
and message
are different. These both are standardized and hence supported by IE11, but this will never differentiate between the same error happening on two different places.
I keep investigating on this issue and update this.
from samsam.
Related Issues (20)
- Match.js improve error message to describe what is going on
- Match.js to support checking for symbol HOT 3
- Proposal: Add `match.json(object)` HOT 1
- Circular dependency HOT 2
- Dependency was DELETED !! COME ON !! PLZ HELP HOT 1
- Create .d.ts from JSDoc
- deepEqual returns true for different promise instances HOT 1
- Infinite recursion on circular object when using sinon.match({})
- Error in headless Chromium HOT 1
- Add Sauce Labs test suite HOT 1
- Failling builds for #44 HOT 2
- Document createMatcher and match.* APIs HOT 2
- Deep equality matching broken on arrays HOT 3
- Version of lodash used is out of date HOT 8
- using deepEqual on Maps always returns true HOT 1
- deepEqual throws an exception while comparing two jQuery objects on IE-11 HOT 2
- Update version of lodash to address high severity vulnerability HOT 2
- Lodash vulnerability HOT 1
- isArgument invalid structure causing low test coverage HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samsam.