primitive-set.js 451 B

123456789101112131415
  1. "use strict";
  2. var getPropertyNames = require("../../object/get-property-names")
  3. , isPlainObject = require("../../object/is-plain-object");
  4. module.exports = function (t, a) {
  5. var x = t();
  6. a(isPlainObject(x), true, "Plain object");
  7. a.deep(getPropertyNames(x), [], "No properties");
  8. x.foo = "bar";
  9. a.deep(getPropertyNames(x), ["foo"], "Extensible");
  10. a.deep(t("raz", "dwa", 3), { raz: true, dwa: true, 3: true },
  11. "Arguments handling");
  12. };