diff --git a/packages/string-templates/test/basic.spec.js b/packages/string-templates/test/basic.spec.ts similarity index 99% rename from packages/string-templates/test/basic.spec.js rename to packages/string-templates/test/basic.spec.ts index 0b78e3cafd..e096a3fe45 100644 --- a/packages/string-templates/test/basic.spec.js +++ b/packages/string-templates/test/basic.spec.ts @@ -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 () => { diff --git a/packages/string-templates/test/constants.js b/packages/string-templates/test/constants.ts similarity index 72% rename from packages/string-templates/test/constants.js rename to packages/string-templates/test/constants.ts index aac0291636..b9e31bcfcc 100644 --- a/packages/string-templates/test/constants.js +++ b/packages/string-templates/test/constants.ts @@ -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 diff --git a/packages/string-templates/test/escapes.spec.js b/packages/string-templates/test/escapes.spec.ts similarity index 100% rename from packages/string-templates/test/escapes.spec.js rename to packages/string-templates/test/escapes.spec.ts diff --git a/packages/string-templates/test/hbsToJs.spec.js b/packages/string-templates/test/hbsToJs.spec.ts similarity index 100% rename from packages/string-templates/test/hbsToJs.spec.js rename to packages/string-templates/test/hbsToJs.spec.ts diff --git a/packages/string-templates/test/helpers.spec.js b/packages/string-templates/test/helpers.spec.ts similarity index 98% rename from packages/string-templates/test/helpers.spec.js rename to packages/string-templates/test/helpers.spec.ts index 86fef538d3..0207ee5568 100644 --- a/packages/string-templates/test/helpers.spec.js +++ b/packages/string-templates/test/helpers.spec.ts @@ -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 () => { diff --git a/packages/string-templates/test/javascript.spec.js b/packages/string-templates/test/javascript.spec.ts similarity index 99% rename from packages/string-templates/test/javascript.spec.js rename to packages/string-templates/test/javascript.spec.ts index 0e9f196da6..3c9524e165 100644 --- a/packages/string-templates/test/javascript.spec.js +++ b/packages/string-templates/test/javascript.spec.ts @@ -4,7 +4,7 @@ const { processStringSync, encodeJSBinding, setJSRunner, -} = require("../src/index.js") +} = require("../src/index") const { UUID_REGEX } = require("./constants") const processJS = (js, context) => { diff --git a/packages/string-templates/test/manifest.spec.js b/packages/string-templates/test/manifest.spec.ts similarity index 96% rename from packages/string-templates/test/manifest.spec.js rename to packages/string-templates/test/manifest.spec.ts index 81183f13c9..cd2041f5d2 100644 --- a/packages/string-templates/test/manifest.spec.js +++ b/packages/string-templates/test/manifest.spec.ts @@ -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") diff --git a/packages/string-templates/test/renderApp.spec.js b/packages/string-templates/test/renderApp.spec.ts similarity index 94% rename from packages/string-templates/test/renderApp.spec.js rename to packages/string-templates/test/renderApp.spec.ts index 582e70701f..f09bc1c2b9 100644 --- a/packages/string-templates/test/renderApp.spec.js +++ b/packages/string-templates/test/renderApp.spec.ts @@ -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 () => { diff --git a/packages/string-templates/test/utils.js b/packages/string-templates/test/utils.ts similarity index 100% rename from packages/string-templates/test/utils.js rename to packages/string-templates/test/utils.ts diff --git a/packages/string-templates/test/vm.spec.js b/packages/string-templates/test/vm.spec.ts similarity index 100% rename from packages/string-templates/test/vm.spec.js rename to packages/string-templates/test/vm.spec.ts