hardlounge/test/client/js/libs/handlebars/tojson.js
2017-11-30 20:33:23 -05:00

14 lines
408 B
JavaScript

"use strict";
const expect = require("chai").expect;
const tojson = require("../../../../../client/js/libs/handlebars/tojson");
describe("tojson Handlebars helper", function() {
it("should return JSON strings", function() {
expect(tojson([])).to.equal("[]");
expect(tojson({})).to.equal("{}");
expect(tojson("")).to.equal('""');
expect(tojson({foo: "bar"})).to.be.equal('{"foo":"bar"}');
});
});