1
0

get-property-names.js 357 B

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