This commit is contained in:
mikesealey 2025-02-24 13:12:25 +00:00
parent 52e4323eda
commit 5c4874d526
2 changed files with 10 additions and 1 deletions

View File

@ -25,7 +25,7 @@ function isObject(value: string | any[]) {
)
}
const HELPERS = [
export const HELPERS = [
// external helpers
new Helper(HelperFunctionNames.OBJECT, (value: any) => {
return new Handlebars.SafeString(JSON.stringify(value))

View File

@ -10,6 +10,8 @@ import {
findHBSBlocks,
} from "../src/index"
import { HELPERS } from "../src/helpers/index"
describe("Test that the string processing works correctly", () => {
it("should process a basic template string", async () => {
const output = await processString("templating is {{ adjective }}", {
@ -338,3 +340,10 @@ describe("check multiple space behaviour", () => {
expect(output).toEqual("test string")
})
})
describe.only("MikeTest1", () => {
it("miktest111", async () => {
const output = "%5B41%5D"
expect(output).toEqual(HELPERS)
})
})