0

I have a test in Typescript that is comparing two objects, and the results show are:

Chrome 57.0.2987 (Mac OS X 10.12.4) Hex should round 1 FAILED
    Expected Hex({ q: 0, r: 0, s: -0 }) to equal Hex({ q: 0, r: -0, s: 0 }).

How can a value of -0 not equal 0 in Jasmine? The only thing I can think of is that it is converting to a string.

  it ('should verify 0 === -0', () => {
    expect(0).toEqual(-0);
  });
nycynik
  • 7,371
  • 8
  • 62
  • 87
  • Possible duplicate of [Are +0 and -0 the same?](http://stackoverflow.com/questions/7223359/are-0-and-0-the-same) – joews Apr 14 '17 at 14:57
  • That answer states `However, +0 === -0 evaluates to true. Why is that (...) ?` – nycynik Sep 13 '17 at 14:40

0 Answers0