Change to js
This commit is contained in:
parent
c9973b5ecd
commit
f782305219
|
@ -8,7 +8,7 @@ const {
|
||||||
doesContainString,
|
doesContainString,
|
||||||
disableEscaping,
|
disableEscaping,
|
||||||
findHBSBlocks,
|
findHBSBlocks,
|
||||||
} = require("../src/index.js")
|
} = require("../src/index")
|
||||||
|
|
||||||
describe("Test that the string processing works correctly", () => {
|
describe("Test that the string processing works correctly", () => {
|
||||||
it("should process a basic template string", async () => {
|
it("should process a basic template string", async () => {
|
|
@ -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
|
/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
|
|
@ -1,7 +1,7 @@
|
||||||
const { processString, processObject, isValid } = require("../src/index.js")
|
import { processString, processObject, isValid } from "../src/index"
|
||||||
const tableJson = require("./examples/table.json")
|
import tableJson from "./examples/table.json"
|
||||||
const dayjs = require("dayjs")
|
import dayjs from "dayjs"
|
||||||
const { UUID_REGEX } = require("./constants")
|
import { UUID_REGEX } from "./constants"
|
||||||
|
|
||||||
describe("test the custom helpers we have applied", () => {
|
describe("test the custom helpers we have applied", () => {
|
||||||
it("should be able to use the object helper", async () => {
|
it("should be able to use the object helper", async () => {
|
|
@ -4,7 +4,7 @@ const {
|
||||||
processStringSync,
|
processStringSync,
|
||||||
encodeJSBinding,
|
encodeJSBinding,
|
||||||
setJSRunner,
|
setJSRunner,
|
||||||
} = require("../src/index.js")
|
} = require("../src/index")
|
||||||
const { UUID_REGEX } = require("./constants")
|
const { UUID_REGEX } = require("./constants")
|
||||||
|
|
||||||
const processJS = (js, context) => {
|
const processJS = (js, context) => {
|
|
@ -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 tk = require("timekeeper")
|
||||||
const { getParsedManifest, runJsHelpersTests } = require("./utils")
|
const { getParsedManifest, runJsHelpersTests } = require("./utils")
|
|
@ -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", () => {
|
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 () => {
|
it("should be able to render the app template", async () => {
|
Loading…
Reference in New Issue