Fixes
This commit is contained in:
parent
38f64aa704
commit
8bbf318f4a
|
@ -108,7 +108,7 @@ export async function processObject(object, context, opts?) {
|
|||
export async function processString(
|
||||
string: string,
|
||||
context: object,
|
||||
opts?: { noHelpers?: boolean; escapeNewlines?: boolean }
|
||||
opts?: { noHelpers?: boolean; escapeNewlines?: boolean; onlyFound?: boolean }
|
||||
) {
|
||||
// TODO: carry out any async calls before carrying out async call
|
||||
return processStringSync(string, context, opts)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const {
|
||||
import {
|
||||
processObject,
|
||||
processString,
|
||||
isValid,
|
||||
|
@ -8,7 +8,7 @@ const {
|
|||
doesContainString,
|
||||
disableEscaping,
|
||||
findHBSBlocks,
|
||||
} = require("../src/index")
|
||||
} from "../src/index"
|
||||
|
||||
describe("Test that the string processing works correctly", () => {
|
||||
it("should process a basic template string", async () => {
|
||||
|
@ -28,7 +28,7 @@ describe("Test that the string processing works correctly", () => {
|
|||
it("should fail gracefully when wrong type passed in", async () => {
|
||||
let error = null
|
||||
try {
|
||||
await processString(null, null)
|
||||
await processString(null as any, null as any)
|
||||
} catch (err) {
|
||||
error = err
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
const vm = require("vm")
|
||||
import vm from "vm"
|
||||
|
||||
const {
|
||||
processStringSync,
|
||||
encodeJSBinding,
|
||||
setJSRunner,
|
||||
} = require("../src/index")
|
||||
const { UUID_REGEX } = require("./constants")
|
||||
import { processStringSync, encodeJSBinding, setJSRunner } from "../src/index"
|
||||
import { UUID_REGEX } from "./constants"
|
||||
|
||||
const processJS = (js, context?) => {
|
||||
return processStringSync(encodeJSBinding(js), context)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { processString } = require("../src/index")
|
||||
import { processString } from "../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 () => {
|
||||
|
|
Loading…
Reference in New Issue