diff icon indicating copy to clipboard operation
diff copied to clipboard

added tests for issue #141

Open atuttle opened this issue 7 years ago • 0 comments
trafficstars

While my findings don't totally agree with what's described in #141, they do show some bugs. In particular, it seems like revert doesn't work at all unless I'm misunderstanding how to use it, or I've made a JS variable memory-reference error).

Plus, I don't see any other tests for revert, so now there will be a few. 😄

  83 passing (227ms)
  4 failing

  1) deep-diff
       regression test for issue #141
         reverts changes correctly when both values are truthy:
     Error: expected 'hello' to equal 1
      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
      at Context.<anonymous> (test/tests.js:607:31)

  2) deep-diff
       regression test for issue #141
         reverts changes correctly when both values are falsey:
     Error: expected 'hello' to equal -1
      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
      at Context.<anonymous> (test/tests.js:613:31)

  3) deep-diff
       regression test for issue #141
         reverts changes correctly when the new value is truthy:
     Error: expected 3 to equal 1
      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
      at Context.<anonymous> (test/tests.js:619:31)

  4) deep-diff
       regression test for issue #141
         reverts changes correctly when the new value is falsey:
     Error: expected 1 to equal -1
      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
      at Context.<anonymous> (test/tests.js:625:31)

atuttle avatar Oct 05 '18 14:10 atuttle