value-to-string.test.js 583 B

1234567891011121314151617181920
  1. "use strict";
  2. var assert = require("@sinonjs/referee-sinon").assert;
  3. var valueToString = require("./value-to-string");
  4. describe("util/core/valueToString", function() {
  5. it("returns string representation of an object", function() {
  6. var obj = {};
  7. assert.equals(valueToString(obj), obj.toString());
  8. });
  9. it("returns 'null' for literal null'", function() {
  10. assert.equals(valueToString(null), "null");
  11. });
  12. it("returns 'undefined' for literal undefined", function() {
  13. assert.equals(valueToString(undefined), "undefined");
  14. });
  15. });