1
0

separate.js 430 B

123456789101112131415
  1. 'use strict';
  2. module.exports = function (t, a) {
  3. var x = [], y = {}, z = {};
  4. a.deep(t.call(x, y), [], "Empty");
  5. a.not(t.call(x), x, "Returns copy");
  6. a.deep(t.call([1], y), [1], "One");
  7. a.deep(t.call([1, 'raz'], y), [1, y, 'raz'], "One");
  8. a.deep(t.call([1, 'raz', x], y), [1, y, 'raz', y, x], "More");
  9. x = new Array(1000);
  10. x[23] = 2;
  11. x[3453] = 'raz';
  12. x[500] = z;
  13. a.deep(t.call(x, y), [2, y, z, y, 'raz'], "Sparse");
  14. };