Change to js

This commit is contained in:
Adria Navarro 2024-02-21 23:11:38 +01:00
parent c9973b5ecd
commit f782305219
10 changed files with 9 additions and 9 deletions

View File

@ -8,7 +8,7 @@ const {
doesContainString,
disableEscaping,
findHBSBlocks,
} = require("../src/index.js")
} = require("../src/index")
describe("Test that the string processing works correctly", () => {
it("should process a basic template string", async () => {

View File

@ -1,2 +1,2 @@
module.exports.UUID_REGEX =
export const UUID_REGEX =
/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i

View File

@ -1,7 +1,7 @@
const { processString, processObject, isValid } = require("../src/index.js")
const tableJson = require("./examples/table.json")
const dayjs = require("dayjs")
const { UUID_REGEX } = require("./constants")
import { processString, processObject, isValid } from "../src/index"
import tableJson from "./examples/table.json"
import dayjs from "dayjs"
import { UUID_REGEX } from "./constants"
describe("test the custom helpers we have applied", () => {
it("should be able to use the object helper", async () => {

View File

@ -4,7 +4,7 @@ const {
processStringSync,
encodeJSBinding,
setJSRunner,
} = require("../src/index.js")
} = require("../src/index")
const { UUID_REGEX } = require("./constants")
const processJS = (js, context) => {

View File

@ -17,7 +17,7 @@ jest.mock("@budibase/handlebars-helpers/lib/uuid", () => {
}
})
const { processString, setJSRunner } = require("../src/index.js")
const { processString, setJSRunner } = require("../src/index")
const tk = require("timekeeper")
const { getParsedManifest, runJsHelpersTests } = require("./utils")

View File

@ -1,4 +1,4 @@
const { processString } = require("../src/index.js")
const { processString } = require("../src/index")
describe("specific test case for whether or not full app template can still be rendered", () => {
it("should be able to render the app template", async () => {