diff --git a/src/testSetup.ts b/src/testSetup.ts index 799dbcb..8e1f4b8 100644 --- a/src/testSetup.ts +++ b/src/testSetup.ts @@ -33,7 +33,7 @@ declare module 'bun:test' { toMatchTree(expected: string): T toMatchExpression(expected: string): T toFailParse(): T - toEvaluateTo(expected: unknown, nativeFunctions?: Record): Promise + toEvaluateTo(expected: unknown, globals?: Record): Promise toFailEvaluation(): Promise } } @@ -96,13 +96,13 @@ expect.extend({ async toEvaluateTo( received: unknown, expected: unknown, - nativeFunctions: Record = {} + globals: Record = {} ) { assert(typeof received === 'string', 'toEvaluateTo can only be used with string values') try { const compiler = new Compiler(received) - const result = await run(compiler.bytecode, nativeFunctions) + const result = await run(compiler.bytecode, globals) let value = VMResultToValue(result) // Just treat regex as strings for comparison purposes