identity.js 386 B

1234567891011121314
  1. "use strict";
  2. var assert = require("chai").assert
  3. , identity = require("../../function/identity");
  4. describe("function/identity", function () {
  5. it("Should return first argument", function () {
  6. assert.equal(identity("foo"), "foo");
  7. var object = {};
  8. assert.equal(identity(object), object);
  9. assert.equal(identity(), undefined);
  10. assert.equal(identity(1, 2, 3), 1);
  11. });
  12. });