From 2a280a10b34792b25ba7ab56af7ca9acaa1b1dc2 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 5 Oct 2025 18:38:22 -0700 Subject: [PATCH] hmm --- tests/native.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/native.test.ts b/tests/native.test.ts index 01c8a20..7d0a4f1 100644 --- a/tests/native.test.ts +++ b/tests/native.test.ts @@ -1,7 +1,7 @@ import { test, expect } from "bun:test" import { VM } from "#vm" import { OpCode } from "#opcode" -import { toValue, toNumber } from "#value" +import { toValue, toNumber, toString } from "#value" test("CALL_NATIVE - basic function call", async () => { const vm = new VM({ @@ -41,8 +41,8 @@ test("CALL_NATIVE - function with string manipulation", async () => { }) vm.registerFunction('concat', (a, b) => { - const aStr = a.type === 'string' ? a.value : String(a.value) - const bStr = b.type === 'string' ? b.value : String(b.value) + const aStr = a.type === 'string' ? a.value : toString(a) + const bStr = b.type === 'string' ? b.value : toString(b) return toValue(aStr + ' ' + bStr) })