get-property-names.js 356 B

1234567891011121314151617
  1. "use strict";
  2. module.exports = function (t, a) {
  3. var o = { first: 1, second: 4 }, r1, r2;
  4. o = Object.create(o, { third: { value: null } });
  5. o.first = 2;
  6. o = Object.create(o);
  7. o.fourth = 3;
  8. r1 = t(o);
  9. r1.sort();
  10. r2 = ["first", "second", "third", "fourth"].concat(
  11. Object.getOwnPropertyNames(Object.prototype)
  12. );
  13. r2.sort();
  14. a.deep(r1, r2);
  15. };