cmp.js 446 B

1234567891011121314151617181920212223
  1. var test = require('tape');
  2. var equal = require('../');
  3. test('equal', function (t) {
  4. t.ok(equal(
  5. { a : [ 2, 3 ], b : [ 4 ] },
  6. { a : [ 2, 3 ], b : [ 4 ] }
  7. ));
  8. t.end();
  9. });
  10. test('not equal', function (t) {
  11. t.notOk(equal(
  12. { x : 5, y : [6] },
  13. { x : 5, y : 6 }
  14. ));
  15. t.end();
  16. });
  17. test('nested nulls', function (t) {
  18. t.ok(equal([ null, null, null ], [ null, null, null ]));
  19. t.end();
  20. });