@0xcert/utils
Version:
General utility module with common helper functions.
17 lines • 623 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const spec_1 = require("@hayspec/spec");
const __1 = require("../..");
const spec = new spec_1.Spec();
spec.test('converts value to string', (ctx) => {
ctx.is(__1.toString(undefined), null);
ctx.is(__1.toString(null), null);
ctx.is(__1.toString(''), '');
ctx.is(__1.toString(NaN), 'NaN');
ctx.is(__1.toString(Infinity), 'Infinity');
ctx.is(__1.toString(true), 'true');
ctx.is(__1.toString(100.1), '100.1');
ctx.is(__1.toString([1, 2]), '1,2');
});
exports.default = spec;
//# sourceMappingURL=to-string.test.js.map
;