Giter VIP home page Giter VIP logo

Comments (3)

mgred avatar mgred commented on June 8, 2024 2
  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.

mroderick avatar mroderick commented on June 8, 2024 1

This has been fixed in #43 which was published as @sinonjs/[email protected]

from samsam.

mgred avatar mgred commented on June 8, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.