budibase/packages/string-templates/test/helpers.spec.js

14 lines
331 B
JavaScript
Raw Normal View History

const {
processString,
} = require("../src/index")
describe("test the custom helpers we have applied", () => {
it("should be able to use the object helper", async () => {
const output = await processString("object is {{ object obj }}", {
obj: { a: 1 },
})
expect(output).toBe("object is {\"a\":1}")
})
})