@ricsam/isolate-test-environment 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
4
  "sourcesContent": [
5
- "import type ivm from \"isolated-vm\";\nimport IsolatedVM from \"isolated-vm\";\n\n// ============================================================\n// Test Environment Options\n// ============================================================\n\nexport interface TestEnvironmentOptions {\n /** Receive test lifecycle events */\n onEvent?: (event: TestEvent) => void;\n /** Timeout for individual tests (ms) */\n testTimeout?: number;\n}\n\n// ============================================================\n// Event Types (discriminated union)\n// ============================================================\n\nexport type TestEvent =\n | { type: \"runStart\"; testCount: number; suiteCount: number }\n | { type: \"suiteStart\"; suite: SuiteInfo }\n | { type: \"suiteEnd\"; suite: SuiteResult }\n | { type: \"testStart\"; test: TestInfo }\n | { type: \"testEnd\"; test: TestResult }\n | { type: \"runEnd\"; results: RunResults };\n\n// ============================================================\n// Suite Types\n// ============================================================\n\nexport interface SuiteInfo {\n name: string;\n /** Ancestry path: [\"outer\", \"inner\"] */\n path: string[];\n /** Full display name: \"outer > inner\" */\n fullName: string;\n /** Nesting depth (0 for root-level suites) */\n depth: number;\n}\n\nexport interface SuiteResult extends SuiteInfo {\n passed: number;\n failed: number;\n skipped: number;\n todo: number;\n duration: number;\n}\n\n// ============================================================\n// Test Types\n// ============================================================\n\nexport interface TestInfo {\n name: string;\n /** Suite ancestry */\n suitePath: string[];\n /** Full display name: \"suite > test name\" */\n fullName: string;\n}\n\nexport interface TestResult extends TestInfo {\n status: \"pass\" | \"fail\" | \"skip\" | \"todo\";\n duration: number;\n error?: TestError;\n}\n\nexport interface TestError {\n message: string;\n stack?: string;\n /** For assertion failures */\n expected?: unknown;\n actual?: unknown;\n /** e.g., \"toBe\", \"toEqual\", \"toContain\" */\n matcherName?: string;\n}\n\n// ============================================================\n// Run Results\n// ============================================================\n\nexport interface RunResults {\n passed: number;\n failed: number;\n skipped: number;\n todo: number;\n total: number;\n duration: number;\n success: boolean;\n suites: SuiteResult[];\n tests: TestResult[];\n}\n\n// ============================================================\n// Handle Interface\n// ============================================================\n\nexport interface TestEnvironmentHandle {\n dispose(): void;\n}\n\nconst testEnvironmentCode = `\n(function() {\n // ============================================================\n // Internal State\n // ============================================================\n\n function createSuite(name, skip = false, only = false) {\n return {\n name,\n tests: [],\n children: [],\n beforeAll: [],\n afterAll: [],\n beforeEach: [],\n afterEach: [],\n skip,\n only,\n };\n }\n\n const rootSuite = createSuite('root');\n let currentSuite = rootSuite;\n const suiteStack = [rootSuite];\n\n // Event callback (set from host)\n let eventCallback = null;\n\n function emitEvent(event) {\n if (eventCallback) {\n try {\n eventCallback(JSON.stringify(event));\n } catch (e) {\n // Ignore callback errors\n }\n }\n }\n\n // ============================================================\n // TestError class for rich error info\n // ============================================================\n\n class TestError extends Error {\n constructor(message, matcherName, expected, actual) {\n super(message);\n this.name = 'TestError';\n this.matcherName = matcherName;\n this.expected = expected;\n this.actual = actual;\n }\n }\n\n // ============================================================\n // Deep Equality Helper\n // ============================================================\n\n function deepEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a !== 'object' || a === null || b === null) return false;\n\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n\n for (const key of keysA) {\n if (!keysB.includes(key)) return false;\n if (!deepEqual(a[key], b[key])) return false;\n }\n return true;\n }\n\n function strictDeepEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a !== 'object' || a === null || b === null) return false;\n\n // Check prototypes\n if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false;\n\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n\n // For arrays, check sparse arrays (holes)\n if (Array.isArray(a)) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n const aHasIndex = i in a;\n const bHasIndex = i in b;\n if (aHasIndex !== bHasIndex) return false;\n if (aHasIndex && !strictDeepEqual(a[i], b[i])) return false;\n }\n return true;\n }\n\n // Check for undefined properties vs missing properties\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n\n for (const key of keysA) {\n if (!keysB.includes(key)) return false;\n if (!strictDeepEqual(a[key], b[key])) return false;\n }\n\n // Check for symbol properties\n const symbolsA = Object.getOwnPropertySymbols(a);\n const symbolsB = Object.getOwnPropertySymbols(b);\n if (symbolsA.length !== symbolsB.length) return false;\n\n for (const sym of symbolsA) {\n if (!symbolsB.includes(sym)) return false;\n if (!strictDeepEqual(a[sym], b[sym])) return false;\n }\n\n return true;\n }\n\n function getNestedProperty(obj, path) {\n const parts = path.split('.');\n let current = obj;\n for (const part of parts) {\n if (current == null || !(part in current)) {\n return { exists: false };\n }\n current = current[part];\n }\n return { exists: true, value: current };\n }\n\n function formatValue(val) {\n if (val === null) return 'null';\n if (val === undefined) return 'undefined';\n if (typeof val === 'string') return JSON.stringify(val);\n if (typeof val === 'object') {\n try {\n return JSON.stringify(val);\n } catch {\n return String(val);\n }\n }\n return String(val);\n }\n\n // ============================================================\n // expect() Implementation\n // ============================================================\n\n function expect(actual) {\n function createMatchers(negated = false) {\n const assert = (condition, message, matcherName, expected) => {\n const pass = negated ? !condition : condition;\n if (!pass) {\n throw new TestError(message, matcherName, expected, actual);\n }\n };\n\n const matchers = {\n toBe(expected) {\n assert(\n actual === expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be \\${formatValue(expected)}\\`,\n 'toBe',\n expected\n );\n },\n\n toEqual(expected) {\n assert(\n deepEqual(actual, expected),\n negated\n ? \\`Expected \\${formatValue(actual)} not to equal \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to equal \\${formatValue(expected)}\\`,\n 'toEqual',\n expected\n );\n },\n\n toStrictEqual(expected) {\n assert(\n strictDeepEqual(actual, expected),\n negated\n ? \\`Expected \\${formatValue(actual)} not to strictly equal \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to strictly equal \\${formatValue(expected)}\\`,\n 'toStrictEqual',\n expected\n );\n },\n\n toBeTruthy() {\n assert(\n !!actual,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be truthy\\`\n : \\`Expected \\${formatValue(actual)} to be truthy\\`,\n 'toBeTruthy',\n true\n );\n },\n\n toBeFalsy() {\n assert(\n !actual,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be falsy\\`\n : \\`Expected \\${formatValue(actual)} to be falsy\\`,\n 'toBeFalsy',\n false\n );\n },\n\n toBeNull() {\n assert(\n actual === null,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be null\\`\n : \\`Expected \\${formatValue(actual)} to be null\\`,\n 'toBeNull',\n null\n );\n },\n\n toBeUndefined() {\n assert(\n actual === undefined,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be undefined\\`\n : \\`Expected \\${formatValue(actual)} to be undefined\\`,\n 'toBeUndefined',\n undefined\n );\n },\n\n toBeDefined() {\n assert(\n actual !== undefined,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be defined\\`\n : \\`Expected \\${formatValue(actual)} to be defined\\`,\n 'toBeDefined',\n 'defined'\n );\n },\n\n toContain(item) {\n let contains = false;\n if (Array.isArray(actual)) {\n contains = actual.includes(item);\n } else if (typeof actual === 'string') {\n contains = actual.includes(item);\n }\n assert(\n contains,\n negated\n ? \\`Expected \\${formatValue(actual)} not to contain \\${formatValue(item)}\\`\n : \\`Expected \\${formatValue(actual)} to contain \\${formatValue(item)}\\`,\n 'toContain',\n item\n );\n },\n\n toThrow(expected) {\n if (typeof actual !== 'function') {\n throw new Error('toThrow requires a function');\n }\n\n let threw = false;\n let error = null;\n try {\n actual();\n } catch (e) {\n threw = true;\n error = e;\n }\n\n if (expected !== undefined) {\n const matches = threw && (\n (typeof expected === 'string' && error.message.includes(expected)) ||\n (expected instanceof RegExp && expected.test(error.message)) ||\n (typeof expected === 'function' && error instanceof expected)\n );\n assert(\n matches,\n negated\n ? \\`Expected function not to throw \\${formatValue(expected)}\\`\n : \\`Expected function to throw \\${formatValue(expected)}, but \\${threw ? \\`threw: \\${error.message}\\` : 'did not throw'}\\`,\n 'toThrow',\n expected\n );\n } else {\n assert(\n threw,\n negated\n ? \\`Expected function not to throw\\`\n : \\`Expected function to throw\\`,\n 'toThrow',\n 'any error'\n );\n }\n },\n\n toBeInstanceOf(cls) {\n assert(\n actual instanceof cls,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be instance of \\${cls.name || cls}\\`\n : \\`Expected \\${formatValue(actual)} to be instance of \\${cls.name || cls}\\`,\n 'toBeInstanceOf',\n cls.name || cls\n );\n },\n\n toHaveLength(length) {\n const actualLength = actual?.length;\n assert(\n actualLength === length,\n negated\n ? \\`Expected length not to be \\${length}, but got \\${actualLength}\\`\n : \\`Expected length to be \\${length}, but got \\${actualLength}\\`,\n 'toHaveLength',\n length\n );\n },\n\n toMatch(pattern) {\n let matches = false;\n if (typeof pattern === 'string') {\n matches = actual.includes(pattern);\n } else if (pattern instanceof RegExp) {\n matches = pattern.test(actual);\n }\n assert(\n matches,\n negated\n ? \\`Expected \\${formatValue(actual)} not to match \\${pattern}\\`\n : \\`Expected \\${formatValue(actual)} to match \\${pattern}\\`,\n 'toMatch',\n pattern\n );\n },\n\n toHaveProperty(path, value) {\n const prop = getNestedProperty(actual, path);\n const hasProperty = prop.exists;\n const valueMatches = arguments.length < 2 || deepEqual(prop.value, value);\n\n assert(\n hasProperty && valueMatches,\n negated\n ? \\`Expected \\${formatValue(actual)} not to have property \\${path}\\${arguments.length >= 2 ? \\` with value \\${formatValue(value)}\\` : ''}\\`\n : \\`Expected \\${formatValue(actual)} to have property \\${path}\\${arguments.length >= 2 ? \\` with value \\${formatValue(value)}\\` : ''}\\`,\n 'toHaveProperty',\n arguments.length >= 2 ? { path, value } : { path }\n );\n },\n\n toBeGreaterThan(expected) {\n assert(\n actual > expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be greater than \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be greater than \\${formatValue(expected)}\\`,\n 'toBeGreaterThan',\n expected\n );\n },\n\n toBeGreaterThanOrEqual(expected) {\n assert(\n actual >= expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be greater than or equal to \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be greater than or equal to \\${formatValue(expected)}\\`,\n 'toBeGreaterThanOrEqual',\n expected\n );\n },\n\n toBeLessThan(expected) {\n assert(\n actual < expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be less than \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be less than \\${formatValue(expected)}\\`,\n 'toBeLessThan',\n expected\n );\n },\n\n toBeLessThanOrEqual(expected) {\n assert(\n actual <= expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be less than or equal to \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be less than or equal to \\${formatValue(expected)}\\`,\n 'toBeLessThanOrEqual',\n expected\n );\n },\n };\n\n return matchers;\n }\n\n const matchers = createMatchers(false);\n matchers.not = createMatchers(true);\n\n return matchers;\n }\n\n // ============================================================\n // Test Registration Functions\n // ============================================================\n\n function describe(name, fn) {\n const suite = createSuite(name);\n currentSuite.children.push(suite);\n\n const parentSuite = currentSuite;\n currentSuite = suite;\n suiteStack.push(suite);\n\n fn();\n\n suiteStack.pop();\n currentSuite = parentSuite;\n }\n\n describe.skip = function(name, fn) {\n const suite = createSuite(name, true, false);\n currentSuite.children.push(suite);\n\n const parentSuite = currentSuite;\n currentSuite = suite;\n suiteStack.push(suite);\n\n fn();\n\n suiteStack.pop();\n currentSuite = parentSuite;\n };\n\n describe.only = function(name, fn) {\n const suite = createSuite(name, false, true);\n currentSuite.children.push(suite);\n\n const parentSuite = currentSuite;\n currentSuite = suite;\n suiteStack.push(suite);\n\n fn();\n\n suiteStack.pop();\n currentSuite = parentSuite;\n };\n\n function test(name, fn) {\n currentSuite.tests.push({\n name,\n fn,\n skip: false,\n only: false,\n });\n }\n\n test.skip = function(name, fn) {\n currentSuite.tests.push({\n name,\n fn,\n skip: true,\n only: false,\n });\n };\n\n test.only = function(name, fn) {\n currentSuite.tests.push({\n name,\n fn,\n skip: false,\n only: true,\n });\n };\n\n test.todo = function(name) {\n currentSuite.tests.push({\n name,\n fn: null,\n skip: false,\n only: false,\n todo: true,\n });\n };\n\n const it = test;\n it.skip = test.skip;\n it.only = test.only;\n it.todo = test.todo;\n\n // ============================================================\n // Lifecycle Hooks\n // ============================================================\n\n function beforeEach(fn) {\n currentSuite.beforeEach.push(fn);\n }\n\n function afterEach(fn) {\n currentSuite.afterEach.push(fn);\n }\n\n function beforeAll(fn) {\n currentSuite.beforeAll.push(fn);\n }\n\n function afterAll(fn) {\n currentSuite.afterAll.push(fn);\n }\n\n // ============================================================\n // Test Runner Helpers\n // ============================================================\n\n function checkForOnly(suite) {\n if (suite.only) return true;\n for (const t of suite.tests) {\n if (t.only) return true;\n }\n for (const child of suite.children) {\n if (checkForOnly(child)) return true;\n }\n return false;\n }\n\n function suiteHasOnly(suite) {\n if (suite.only) return true;\n for (const t of suite.tests) {\n if (t.only) return true;\n }\n for (const child of suite.children) {\n if (suiteHasOnly(child)) return true;\n }\n return false;\n }\n\n function countTests(suite, hasOnly) {\n let count = 0;\n if (hasOnly && !suiteHasOnly(suite)) return 0;\n if (suite.skip) return suite.tests.length;\n\n for (const t of suite.tests) {\n if (hasOnly && !t.only && !suite.only) continue;\n count++;\n }\n for (const child of suite.children) {\n count += countTests(child, hasOnly);\n }\n return count;\n }\n\n function countSuites(suite, hasOnly) {\n let count = 0;\n if (hasOnly && !suiteHasOnly(suite)) return 0;\n\n for (const child of suite.children) {\n count++;\n count += countSuites(child, hasOnly);\n }\n return count;\n }\n\n // ============================================================\n // Test Runner\n // ============================================================\n\n async function __runAllTests() {\n const testResults = [];\n const suiteResults = [];\n const hasOnly = checkForOnly(rootSuite);\n const runStart = Date.now();\n\n // Emit runStart\n const testCount = countTests(rootSuite, hasOnly);\n const suiteCount = countSuites(rootSuite, hasOnly);\n emitEvent({ type: 'runStart', testCount, suiteCount });\n\n async function runSuite(suite, parentHooks, pathArray, depth) {\n // Skip if this suite doesn't have any .only when .only exists elsewhere\n if (hasOnly && !suiteHasOnly(suite)) return;\n\n const suitePath = [...pathArray];\n const fullName = suitePath.join(' > ');\n const suiteInfo = {\n name: suite.name,\n path: suitePath.slice(0, -1),\n fullName,\n depth,\n };\n\n // Emit suiteStart (only for non-root suites)\n if (suite !== rootSuite) {\n emitEvent({ type: 'suiteStart', suite: suiteInfo });\n }\n\n const suiteStart = Date.now();\n let suitePassed = 0;\n let suiteFailed = 0;\n let suiteSkipped = 0;\n let suiteTodo = 0;\n\n // Skip if suite is marked as skip\n if (suite.skip) {\n // Mark all tests in this suite as skipped\n for (const t of suite.tests) {\n const testFullName = fullName ? fullName + ' > ' + t.name : t.name;\n const testInfo = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n };\n emitEvent({ type: 'testStart', test: testInfo });\n\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'skip',\n duration: 0,\n };\n testResults.push(testResult);\n suiteSkipped++;\n\n emitEvent({ type: 'testEnd', test: testResult });\n }\n } else {\n // Run beforeAll hooks\n for (const hook of suite.beforeAll) {\n await hook();\n }\n\n // Run tests\n for (const t of suite.tests) {\n const testFullName = fullName ? fullName + ' > ' + t.name : t.name;\n const testInfo = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n };\n\n // Skip if .only is used and this test isn't .only AND the suite doesn't have .only\n if (hasOnly && !t.only && !suite.only) continue;\n\n emitEvent({ type: 'testStart', test: testInfo });\n\n // Skip if test is marked as skip\n if (t.skip) {\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'skip',\n duration: 0,\n };\n testResults.push(testResult);\n suiteSkipped++;\n emitEvent({ type: 'testEnd', test: testResult });\n continue;\n }\n\n // Handle todo tests (no function provided)\n if (t.todo) {\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'todo',\n duration: 0,\n };\n testResults.push(testResult);\n suiteTodo++;\n emitEvent({ type: 'testEnd', test: testResult });\n continue;\n }\n\n const testStart = Date.now();\n try {\n // Run all beforeEach hooks (parent first, then current)\n for (const hook of [...parentHooks.beforeEach, ...suite.beforeEach]) {\n await hook();\n }\n\n // Run test\n await t.fn();\n\n // Run all afterEach hooks (current first, then parent)\n for (const hook of [...suite.afterEach, ...parentHooks.afterEach]) {\n await hook();\n }\n\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'pass',\n duration: Date.now() - testStart,\n };\n testResults.push(testResult);\n suitePassed++;\n emitEvent({ type: 'testEnd', test: testResult });\n } catch (err) {\n const testError = {\n message: err.message || String(err),\n stack: err.stack,\n };\n // If it's a TestError, include matcher info\n if (err.matcherName !== undefined) {\n testError.matcherName = err.matcherName;\n testError.expected = err.expected;\n testError.actual = err.actual;\n }\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'fail',\n duration: Date.now() - testStart,\n error: testError,\n };\n testResults.push(testResult);\n suiteFailed++;\n emitEvent({ type: 'testEnd', test: testResult });\n }\n }\n\n // Run child suites\n for (const child of suite.children) {\n const childPath = [...suitePath, child.name];\n await runSuite(child, {\n beforeEach: [...parentHooks.beforeEach, ...suite.beforeEach],\n afterEach: [...suite.afterEach, ...parentHooks.afterEach],\n }, childPath, depth + 1);\n }\n\n // Run afterAll hooks\n for (const hook of suite.afterAll) {\n await hook();\n }\n }\n\n // Emit suiteEnd (only for non-root suites)\n if (suite !== rootSuite) {\n const suiteResult = {\n ...suiteInfo,\n passed: suitePassed,\n failed: suiteFailed,\n skipped: suiteSkipped,\n todo: suiteTodo,\n duration: Date.now() - suiteStart,\n };\n suiteResults.push(suiteResult);\n emitEvent({ type: 'suiteEnd', suite: suiteResult });\n }\n }\n\n await runSuite(rootSuite, { beforeEach: [], afterEach: [] }, [], -1);\n\n const passed = testResults.filter(r => r.status === 'pass').length;\n const failed = testResults.filter(r => r.status === 'fail').length;\n const skipped = testResults.filter(r => r.status === 'skip').length;\n const todo = testResults.filter(r => r.status === 'todo').length;\n\n const runResults = {\n passed,\n failed,\n skipped,\n todo,\n total: testResults.length,\n duration: Date.now() - runStart,\n success: failed === 0,\n suites: suiteResults,\n tests: testResults,\n };\n\n emitEvent({ type: 'runEnd', results: runResults });\n\n return JSON.stringify(runResults);\n }\n\n // ============================================================\n // Helper Functions\n // ============================================================\n\n function __hasTests() {\n function checkSuite(suite) {\n if (suite.tests.length > 0) return true;\n for (const child of suite.children) {\n if (checkSuite(child)) return true;\n }\n return false;\n }\n return checkSuite(rootSuite);\n }\n\n function __getTestCount() {\n function countInSuite(suite) {\n let count = suite.tests.length;\n for (const child of suite.children) {\n count += countInSuite(child);\n }\n return count;\n }\n return countInSuite(rootSuite);\n }\n\n // Reset function to clear state between runs\n function __resetTestEnvironment() {\n rootSuite.tests = [];\n rootSuite.children = [];\n rootSuite.beforeAll = [];\n rootSuite.afterAll = [];\n rootSuite.beforeEach = [];\n rootSuite.afterEach = [];\n currentSuite = rootSuite;\n suiteStack.length = 0;\n suiteStack.push(rootSuite);\n }\n\n function __setEventCallback(callback) {\n eventCallback = callback;\n }\n\n // ============================================================\n // Expose Globals\n // ============================================================\n\n globalThis.describe = describe;\n globalThis.test = test;\n globalThis.it = it;\n globalThis.expect = expect;\n globalThis.beforeEach = beforeEach;\n globalThis.afterEach = afterEach;\n globalThis.beforeAll = beforeAll;\n globalThis.afterAll = afterAll;\n globalThis.__runAllTests = __runAllTests;\n globalThis.__resetTestEnvironment = __resetTestEnvironment;\n globalThis.__hasTests = __hasTests;\n globalThis.__getTestCount = __getTestCount;\n globalThis.__setEventCallback = __setEventCallback;\n})();\n`;\n\n/**\n * Setup test environment primitives in an isolated-vm context\n *\n * Provides Jest/Vitest-compatible test primitives:\n * - describe, test, it\n * - beforeEach, afterEach, beforeAll, afterAll\n * - expect matchers\n *\n * @example\n * const handle = await setupTestEnvironment(context, {\n * onEvent: (event) => console.log(event),\n * });\n *\n * await context.eval(`\n * describe(\"my tests\", () => {\n * test(\"example\", () => {\n * expect(1 + 1).toBe(2);\n * });\n * });\n * `);\n */\nexport async function setupTestEnvironment(\n context: ivm.Context,\n options?: TestEnvironmentOptions\n): Promise<TestEnvironmentHandle> {\n context.evalSync(testEnvironmentCode);\n\n // Set up event callback if provided\n if (options?.onEvent) {\n const eventCallbackRef = new IsolatedVM.Reference((eventJson: string) => {\n try {\n const event = JSON.parse(eventJson);\n options.onEvent!(event);\n } catch {\n // Ignore parse errors\n }\n });\n\n const global = context.global;\n global.setSync(\"__eventCallbackRef\", eventCallbackRef);\n context.evalSync(`\n __setEventCallback((eventJson) => {\n __eventCallbackRef.applySync(undefined, [eventJson]);\n });\n `);\n }\n\n return {\n dispose() {\n // Reset the test environment state\n try {\n context.evalSync(\"__resetTestEnvironment()\");\n } catch {\n // Context may already be released\n }\n },\n };\n}\n\n/**\n * Run tests in the context and return results\n */\nexport async function runTests(context: ivm.Context): Promise<RunResults> {\n const resultJson = await context.eval(\"__runAllTests()\", { promise: true });\n return JSON.parse(resultJson as string);\n}\n\n/**\n * Check if any tests are registered\n */\nexport function hasTests(context: ivm.Context): boolean {\n return context.evalSync(\"__hasTests()\") as boolean;\n}\n\n/**\n * Get the count of registered tests\n */\nexport function getTestCount(context: ivm.Context): number {\n return context.evalSync(\"__getTestCount()\") as number;\n}\n"
5
+ "import type ivm from \"isolated-vm\";\nimport IsolatedVM from \"isolated-vm\";\n\n// ============================================================\n// Test Environment Options\n// ============================================================\n\nexport interface TestEnvironmentOptions {\n /** Receive test lifecycle events */\n onEvent?: (event: TestEvent) => void;\n /** Timeout for individual tests (ms) */\n testTimeout?: number;\n}\n\n// ============================================================\n// Event Types (discriminated union)\n// ============================================================\n\nexport type TestEvent =\n | { type: \"runStart\"; testCount: number; suiteCount: number }\n | { type: \"suiteStart\"; suite: SuiteInfo }\n | { type: \"suiteEnd\"; suite: SuiteResult }\n | { type: \"testStart\"; test: TestInfo }\n | { type: \"testEnd\"; test: TestResult }\n | { type: \"runEnd\"; results: RunResults };\n\n// ============================================================\n// Suite Types\n// ============================================================\n\nexport interface SuiteInfo {\n name: string;\n /** Ancestry path: [\"outer\", \"inner\"] */\n path: string[];\n /** Full display name: \"outer > inner\" */\n fullName: string;\n /** Nesting depth (0 for root-level suites) */\n depth: number;\n}\n\nexport interface SuiteResult extends SuiteInfo {\n passed: number;\n failed: number;\n skipped: number;\n todo: number;\n duration: number;\n}\n\n// ============================================================\n// Test Types\n// ============================================================\n\nexport interface TestInfo {\n name: string;\n /** Suite ancestry */\n suitePath: string[];\n /** Full display name: \"suite > test name\" */\n fullName: string;\n}\n\nexport interface TestResult extends TestInfo {\n status: \"pass\" | \"fail\" | \"skip\" | \"todo\";\n duration: number;\n error?: TestError;\n}\n\nexport interface TestError {\n message: string;\n stack?: string;\n /** For assertion failures */\n expected?: unknown;\n actual?: unknown;\n /** e.g., \"toBe\", \"toEqual\", \"toContain\" */\n matcherName?: string;\n}\n\n// ============================================================\n// Run Results\n// ============================================================\n\nexport interface RunResults {\n passed: number;\n failed: number;\n skipped: number;\n todo: number;\n total: number;\n duration: number;\n success: boolean;\n suites: SuiteResult[];\n tests: TestResult[];\n}\n\n// ============================================================\n// Handle Interface\n// ============================================================\n\nexport interface TestEnvironmentHandle {\n dispose(): void;\n}\n\nconst testEnvironmentCode = `\n(function() {\n // ============================================================\n // Internal State\n // ============================================================\n\n // Mock registry and call counter\n let __mockCallOrder = 0;\n const __mockRegistry = [];\n\n // Assertion counting state\n let __expectedAssertions = null;\n let __assertionCount = 0;\n let __hasAssertionsFlag = false;\n\n function createMockState() {\n return {\n calls: [],\n results: [],\n contexts: [],\n instances: [],\n invocationCallOrder: [],\n lastCall: undefined,\n };\n }\n\n function createSuite(name, skip = false, only = false) {\n return {\n name,\n tests: [],\n children: [],\n beforeAll: [],\n afterAll: [],\n beforeEach: [],\n afterEach: [],\n skip,\n only,\n };\n }\n\n const rootSuite = createSuite('root');\n let currentSuite = rootSuite;\n const suiteStack = [rootSuite];\n\n // Event callback (set from host)\n let eventCallback = null;\n\n function emitEvent(event) {\n if (eventCallback) {\n try {\n eventCallback(JSON.stringify(event));\n } catch (e) {\n // Ignore callback errors\n }\n }\n }\n\n // ============================================================\n // TestError class for rich error info\n // ============================================================\n\n class TestError extends Error {\n constructor(message, matcherName, expected, actual) {\n super(message);\n this.name = 'TestError';\n this.matcherName = matcherName;\n this.expected = expected;\n this.actual = actual;\n }\n }\n\n // ============================================================\n // Asymmetric Matcher Infrastructure\n // ============================================================\n\n const ASYMMETRIC_MATCHER = Symbol('asymmetricMatcher');\n\n function isAsymmetricMatcher(obj) {\n return obj && obj[ASYMMETRIC_MATCHER] === true;\n }\n\n // Deep equality with asymmetric matcher support\n function asymmetricDeepEqual(a, b) {\n if (isAsymmetricMatcher(b)) return b.asymmetricMatch(a);\n if (isAsymmetricMatcher(a)) return a.asymmetricMatch(b);\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a !== 'object' || a === null || b === null) return false;\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!keysB.includes(key)) return false;\n if (!asymmetricDeepEqual(a[key], b[key])) return false;\n }\n return true;\n }\n\n // ============================================================\n // Deep Equality Helper\n // ============================================================\n\n function deepEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a !== 'object' || a === null || b === null) return false;\n\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n\n for (const key of keysA) {\n if (!keysB.includes(key)) return false;\n if (!deepEqual(a[key], b[key])) return false;\n }\n return true;\n }\n\n function strictDeepEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a !== 'object' || a === null || b === null) return false;\n\n // Check prototypes\n if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false;\n\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n\n // For arrays, check sparse arrays (holes)\n if (Array.isArray(a)) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n const aHasIndex = i in a;\n const bHasIndex = i in b;\n if (aHasIndex !== bHasIndex) return false;\n if (aHasIndex && !strictDeepEqual(a[i], b[i])) return false;\n }\n return true;\n }\n\n // Check for undefined properties vs missing properties\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n\n for (const key of keysA) {\n if (!keysB.includes(key)) return false;\n if (!strictDeepEqual(a[key], b[key])) return false;\n }\n\n // Check for symbol properties\n const symbolsA = Object.getOwnPropertySymbols(a);\n const symbolsB = Object.getOwnPropertySymbols(b);\n if (symbolsA.length !== symbolsB.length) return false;\n\n for (const sym of symbolsA) {\n if (!symbolsB.includes(sym)) return false;\n if (!strictDeepEqual(a[sym], b[sym])) return false;\n }\n\n return true;\n }\n\n function getNestedProperty(obj, path) {\n const parts = path.split('.');\n let current = obj;\n for (const part of parts) {\n if (current == null || !(part in current)) {\n return { exists: false };\n }\n current = current[part];\n }\n return { exists: true, value: current };\n }\n\n function formatValue(val) {\n if (val === null) return 'null';\n if (val === undefined) return 'undefined';\n if (typeof val === 'string') return JSON.stringify(val);\n if (typeof val === 'object') {\n try {\n return JSON.stringify(val);\n } catch {\n return String(val);\n }\n }\n return String(val);\n }\n\n // ============================================================\n // expect() Implementation\n // ============================================================\n\n function expect(actual) {\n function createMatchers(negated = false) {\n const assert = (condition, message, matcherName, expected) => {\n __assertionCount++;\n const pass = negated ? !condition : condition;\n if (!pass) {\n throw new TestError(message, matcherName, expected, actual);\n }\n };\n\n const matchers = {\n toBe(expected) {\n assert(\n actual === expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be \\${formatValue(expected)}\\`,\n 'toBe',\n expected\n );\n },\n\n toEqual(expected) {\n assert(\n asymmetricDeepEqual(actual, expected),\n negated\n ? \\`Expected \\${formatValue(actual)} not to equal \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to equal \\${formatValue(expected)}\\`,\n 'toEqual',\n expected\n );\n },\n\n toStrictEqual(expected) {\n assert(\n strictDeepEqual(actual, expected),\n negated\n ? \\`Expected \\${formatValue(actual)} not to strictly equal \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to strictly equal \\${formatValue(expected)}\\`,\n 'toStrictEqual',\n expected\n );\n },\n\n toBeTruthy() {\n assert(\n !!actual,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be truthy\\`\n : \\`Expected \\${formatValue(actual)} to be truthy\\`,\n 'toBeTruthy',\n true\n );\n },\n\n toBeFalsy() {\n assert(\n !actual,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be falsy\\`\n : \\`Expected \\${formatValue(actual)} to be falsy\\`,\n 'toBeFalsy',\n false\n );\n },\n\n toBeNull() {\n assert(\n actual === null,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be null\\`\n : \\`Expected \\${formatValue(actual)} to be null\\`,\n 'toBeNull',\n null\n );\n },\n\n toBeUndefined() {\n assert(\n actual === undefined,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be undefined\\`\n : \\`Expected \\${formatValue(actual)} to be undefined\\`,\n 'toBeUndefined',\n undefined\n );\n },\n\n toBeDefined() {\n assert(\n actual !== undefined,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be defined\\`\n : \\`Expected \\${formatValue(actual)} to be defined\\`,\n 'toBeDefined',\n 'defined'\n );\n },\n\n toContain(item) {\n let contains = false;\n if (Array.isArray(actual)) {\n contains = actual.includes(item);\n } else if (typeof actual === 'string') {\n contains = actual.includes(item);\n }\n assert(\n contains,\n negated\n ? \\`Expected \\${formatValue(actual)} not to contain \\${formatValue(item)}\\`\n : \\`Expected \\${formatValue(actual)} to contain \\${formatValue(item)}\\`,\n 'toContain',\n item\n );\n },\n\n toThrow(expected) {\n if (typeof actual !== 'function') {\n throw new Error('toThrow requires a function');\n }\n\n let threw = false;\n let error = null;\n try {\n actual();\n } catch (e) {\n threw = true;\n error = e;\n }\n\n if (expected !== undefined) {\n const matches = threw && (\n (typeof expected === 'string' && error.message.includes(expected)) ||\n (expected instanceof RegExp && expected.test(error.message)) ||\n (typeof expected === 'function' && error instanceof expected)\n );\n assert(\n matches,\n negated\n ? \\`Expected function not to throw \\${formatValue(expected)}\\`\n : \\`Expected function to throw \\${formatValue(expected)}, but \\${threw ? \\`threw: \\${error.message}\\` : 'did not throw'}\\`,\n 'toThrow',\n expected\n );\n } else {\n assert(\n threw,\n negated\n ? \\`Expected function not to throw\\`\n : \\`Expected function to throw\\`,\n 'toThrow',\n 'any error'\n );\n }\n },\n\n toBeInstanceOf(cls) {\n assert(\n actual instanceof cls,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be instance of \\${cls.name || cls}\\`\n : \\`Expected \\${formatValue(actual)} to be instance of \\${cls.name || cls}\\`,\n 'toBeInstanceOf',\n cls.name || cls\n );\n },\n\n toHaveLength(length) {\n const actualLength = actual?.length;\n assert(\n actualLength === length,\n negated\n ? \\`Expected length not to be \\${length}, but got \\${actualLength}\\`\n : \\`Expected length to be \\${length}, but got \\${actualLength}\\`,\n 'toHaveLength',\n length\n );\n },\n\n toMatch(pattern) {\n let matches = false;\n if (typeof pattern === 'string') {\n matches = actual.includes(pattern);\n } else if (pattern instanceof RegExp) {\n matches = pattern.test(actual);\n }\n assert(\n matches,\n negated\n ? \\`Expected \\${formatValue(actual)} not to match \\${pattern}\\`\n : \\`Expected \\${formatValue(actual)} to match \\${pattern}\\`,\n 'toMatch',\n pattern\n );\n },\n\n toHaveProperty(path, value) {\n const prop = getNestedProperty(actual, path);\n const hasProperty = prop.exists;\n const valueMatches = arguments.length < 2 || asymmetricDeepEqual(prop.value, value);\n\n assert(\n hasProperty && valueMatches,\n negated\n ? \\`Expected \\${formatValue(actual)} not to have property \\${path}\\${arguments.length >= 2 ? \\` with value \\${formatValue(value)}\\` : ''}\\`\n : \\`Expected \\${formatValue(actual)} to have property \\${path}\\${arguments.length >= 2 ? \\` with value \\${formatValue(value)}\\` : ''}\\`,\n 'toHaveProperty',\n arguments.length >= 2 ? { path, value } : { path }\n );\n },\n\n toBeGreaterThan(expected) {\n assert(\n actual > expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be greater than \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be greater than \\${formatValue(expected)}\\`,\n 'toBeGreaterThan',\n expected\n );\n },\n\n toBeGreaterThanOrEqual(expected) {\n assert(\n actual >= expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be greater than or equal to \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be greater than or equal to \\${formatValue(expected)}\\`,\n 'toBeGreaterThanOrEqual',\n expected\n );\n },\n\n toBeLessThan(expected) {\n assert(\n actual < expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be less than \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be less than \\${formatValue(expected)}\\`,\n 'toBeLessThan',\n expected\n );\n },\n\n toBeLessThanOrEqual(expected) {\n assert(\n actual <= expected,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be less than or equal to \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to be less than or equal to \\${formatValue(expected)}\\`,\n 'toBeLessThanOrEqual',\n expected\n );\n },\n\n toBeCloseTo(expected, numDigits = 2) {\n const precision = Math.pow(10, -numDigits) / 2;\n const pass = Math.abs(actual - expected) < precision;\n assert(\n pass,\n negated\n ? \\`Expected \\${formatValue(actual)} not to be close to \\${formatValue(expected)} (precision: \\${numDigits} digits)\\`\n : \\`Expected \\${formatValue(actual)} to be close to \\${formatValue(expected)} (precision: \\${numDigits} digits)\\`,\n 'toBeCloseTo',\n expected\n );\n },\n\n toBeNaN() {\n assert(\n Number.isNaN(actual),\n negated\n ? \\`Expected \\${formatValue(actual)} not to be NaN\\`\n : \\`Expected \\${formatValue(actual)} to be NaN\\`,\n 'toBeNaN',\n NaN\n );\n },\n\n toMatchObject(expected) {\n function matchesObject(obj, pattern) {\n if (isAsymmetricMatcher(pattern)) return pattern.asymmetricMatch(obj);\n if (typeof pattern !== 'object' || pattern === null) return obj === pattern;\n if (typeof obj !== 'object' || obj === null) return false;\n for (const key of Object.keys(pattern)) {\n if (!(key in obj)) return false;\n if (!matchesObject(obj[key], pattern[key])) return false;\n }\n return true;\n }\n assert(\n matchesObject(actual, expected),\n negated\n ? \\`Expected \\${formatValue(actual)} not to match object \\${formatValue(expected)}\\`\n : \\`Expected \\${formatValue(actual)} to match object \\${formatValue(expected)}\\`,\n 'toMatchObject',\n expected\n );\n },\n\n toContainEqual(item) {\n const contains = Array.isArray(actual) && actual.some(el => asymmetricDeepEqual(el, item));\n assert(\n contains,\n negated\n ? \\`Expected array not to contain equal \\${formatValue(item)}\\`\n : \\`Expected array to contain equal \\${formatValue(item)}\\`,\n 'toContainEqual',\n item\n );\n },\n\n toBeTypeOf(expectedType) {\n const actualType = typeof actual;\n assert(\n actualType === expectedType,\n negated\n ? \\`Expected typeof \\${formatValue(actual)} not to be \"\\${expectedType}\"\\`\n : \\`Expected typeof \\${formatValue(actual)} to be \"\\${expectedType}\", got \"\\${actualType}\"\\`,\n 'toBeTypeOf',\n expectedType\n );\n },\n\n // Mock matchers\n toHaveBeenCalled() {\n if (!actual.__isMockFunction) throw new Error('toHaveBeenCalled requires a mock function');\n assert(actual.mock.calls.length > 0,\n negated ? \\`Expected mock not to have been called\\` : \\`Expected mock to have been called\\`,\n 'toHaveBeenCalled', 'called');\n },\n\n toHaveBeenCalledTimes(n) {\n if (!actual.__isMockFunction) throw new Error('toHaveBeenCalledTimes requires a mock function');\n assert(actual.mock.calls.length === n,\n negated ? \\`Expected mock not to have been called \\${n} times\\`\n : \\`Expected mock to be called \\${n} times, got \\${actual.mock.calls.length}\\`,\n 'toHaveBeenCalledTimes', n);\n },\n\n toHaveBeenCalledWith(...expectedArgs) {\n if (!actual.__isMockFunction) throw new Error('toHaveBeenCalledWith requires a mock function');\n const match = actual.mock.calls.some(args => asymmetricDeepEqual(args, expectedArgs));\n assert(match,\n negated ? \\`Expected mock not to have been called with \\${formatValue(expectedArgs)}\\`\n : \\`Expected mock to have been called with \\${formatValue(expectedArgs)}\\`,\n 'toHaveBeenCalledWith', expectedArgs);\n },\n\n toHaveBeenLastCalledWith(...expectedArgs) {\n if (!actual.__isMockFunction) throw new Error('toHaveBeenLastCalledWith requires a mock function');\n assert(actual.mock.lastCall && asymmetricDeepEqual(actual.mock.lastCall, expectedArgs),\n negated ? \\`Expected last call not to be \\${formatValue(expectedArgs)}\\`\n : \\`Expected last call to be \\${formatValue(expectedArgs)}, got \\${formatValue(actual.mock.lastCall)}\\`,\n 'toHaveBeenLastCalledWith', expectedArgs);\n },\n\n toHaveBeenNthCalledWith(n, ...expectedArgs) {\n if (!actual.__isMockFunction) throw new Error('toHaveBeenNthCalledWith requires a mock function');\n const nthCall = actual.mock.calls[n - 1];\n assert(nthCall && asymmetricDeepEqual(nthCall, expectedArgs),\n negated ? \\`Expected call \\${n} not to be \\${formatValue(expectedArgs)}\\`\n : \\`Expected call \\${n} to be \\${formatValue(expectedArgs)}, got \\${formatValue(nthCall)}\\`,\n 'toHaveBeenNthCalledWith', expectedArgs);\n },\n\n toHaveReturned() {\n if (!actual.__isMockFunction) throw new Error('toHaveReturned requires a mock function');\n const hasReturned = actual.mock.results.some(r => r.type === 'return');\n assert(hasReturned,\n negated ? \\`Expected mock not to have returned\\` : \\`Expected mock to have returned\\`,\n 'toHaveReturned', 'returned');\n },\n\n toHaveReturnedWith(value) {\n if (!actual.__isMockFunction) throw new Error('toHaveReturnedWith requires a mock function');\n const match = actual.mock.results.some(r => r.type === 'return' && asymmetricDeepEqual(r.value, value));\n assert(match,\n negated ? \\`Expected mock not to have returned \\${formatValue(value)}\\`\n : \\`Expected mock to have returned \\${formatValue(value)}\\`,\n 'toHaveReturnedWith', value);\n },\n\n toHaveLastReturnedWith(value) {\n if (!actual.__isMockFunction) throw new Error('toHaveLastReturnedWith requires a mock function');\n const returns = actual.mock.results.filter(r => r.type === 'return');\n const last = returns[returns.length - 1];\n assert(last && asymmetricDeepEqual(last.value, value),\n negated ? \\`Expected last return not to be \\${formatValue(value)}\\`\n : \\`Expected last return to be \\${formatValue(value)}, got \\${formatValue(last?.value)}\\`,\n 'toHaveLastReturnedWith', value);\n },\n\n toHaveReturnedTimes(n) {\n if (!actual.__isMockFunction) throw new Error('toHaveReturnedTimes requires a mock function');\n const returnCount = actual.mock.results.filter(r => r.type === 'return').length;\n assert(returnCount === n,\n negated ? \\`Expected mock not to have returned \\${n} times\\`\n : \\`Expected mock to have returned \\${n} times, got \\${returnCount}\\`,\n 'toHaveReturnedTimes', n);\n },\n\n toHaveNthReturnedWith(n, value) {\n if (!actual.__isMockFunction) throw new Error('toHaveNthReturnedWith requires a mock function');\n const returns = actual.mock.results.filter(r => r.type === 'return');\n const nthReturn = returns[n - 1];\n assert(nthReturn && asymmetricDeepEqual(nthReturn.value, value),\n negated ? \\`Expected return \\${n} not to be \\${formatValue(value)}\\`\n : \\`Expected return \\${n} to be \\${formatValue(value)}, got \\${formatValue(nthReturn?.value)}\\`,\n 'toHaveNthReturnedWith', value);\n },\n };\n\n return matchers;\n }\n\n const matchers = createMatchers(false);\n matchers.not = createMatchers(true);\n\n // Promise matchers using Proxy\n matchers.resolves = new Proxy({}, {\n get(_, matcherName) {\n if (matcherName === 'not') {\n return new Proxy({}, {\n get(_, negatedMatcherName) {\n return async (...args) => {\n const result = await actual;\n return expect(result).not[negatedMatcherName](...args);\n };\n }\n });\n }\n return async (...args) => {\n const result = await actual;\n return expect(result)[matcherName](...args);\n };\n }\n });\n\n matchers.rejects = new Proxy({}, {\n get(_, matcherName) {\n if (matcherName === 'not') {\n return new Proxy({}, {\n get(_, negatedMatcherName) {\n return async (...args) => {\n let error;\n try {\n await actual;\n throw new TestError('Expected promise to reject', 'rejects', 'rejection', undefined);\n } catch (e) {\n if (e instanceof TestError && e.matcherName === 'rejects') throw e;\n error = e;\n }\n return expect(error).not[negatedMatcherName](...args);\n };\n }\n });\n }\n return async (...args) => {\n let error;\n try {\n await actual;\n throw new TestError('Expected promise to reject', 'rejects', 'rejection', undefined);\n } catch (e) {\n if (e instanceof TestError && e.matcherName === 'rejects') throw e;\n error = e;\n }\n return expect(error)[matcherName](...args);\n };\n }\n });\n\n return matchers;\n }\n\n // Asymmetric matcher implementations\n expect.anything = () => ({\n [ASYMMETRIC_MATCHER]: true,\n asymmetricMatch: (other) => other !== null && other !== undefined,\n toString: () => 'anything()',\n });\n\n expect.any = (constructor) => ({\n [ASYMMETRIC_MATCHER]: true,\n asymmetricMatch: (other) => {\n if (constructor === String) return typeof other === 'string' || other instanceof String;\n if (constructor === Number) return typeof other === 'number' || other instanceof Number;\n if (constructor === Boolean) return typeof other === 'boolean' || other instanceof Boolean;\n if (constructor === Function) return typeof other === 'function';\n if (constructor === Object) return typeof other === 'object' && other !== null;\n if (constructor === Array) return Array.isArray(other);\n return other instanceof constructor;\n },\n toString: () => \\`any(\\${constructor.name || constructor})\\`,\n });\n\n expect.stringContaining = (str) => ({\n [ASYMMETRIC_MATCHER]: true,\n asymmetricMatch: (other) => typeof other === 'string' && other.includes(str),\n toString: () => \\`stringContaining(\"\\${str}\")\\`,\n });\n\n expect.stringMatching = (pattern) => ({\n [ASYMMETRIC_MATCHER]: true,\n asymmetricMatch: (other) => {\n if (typeof other !== 'string') return false;\n return typeof pattern === 'string' ? other.includes(pattern) : pattern.test(other);\n },\n toString: () => \\`stringMatching(\\${pattern})\\`,\n });\n\n expect.arrayContaining = (expected) => ({\n [ASYMMETRIC_MATCHER]: true,\n asymmetricMatch: (other) => {\n if (!Array.isArray(other)) return false;\n return expected.every(exp => other.some(item => asymmetricDeepEqual(item, exp)));\n },\n toString: () => \\`arrayContaining(\\${formatValue(expected)})\\`,\n });\n\n expect.objectContaining = (expected) => ({\n [ASYMMETRIC_MATCHER]: true,\n asymmetricMatch: (other) => {\n if (typeof other !== 'object' || other === null) return false;\n for (const key of Object.keys(expected)) {\n if (!(key in other)) return false;\n if (!asymmetricDeepEqual(other[key], expected[key])) return false;\n }\n return true;\n },\n toString: () => \\`objectContaining(\\${formatValue(expected)})\\`,\n });\n\n // Assertion counting\n expect.assertions = (n) => {\n __expectedAssertions = n;\n };\n\n expect.hasAssertions = () => {\n __hasAssertionsFlag = true;\n };\n\n // ============================================================\n // Test Registration Functions\n // ============================================================\n\n function describe(name, fn) {\n const suite = createSuite(name);\n currentSuite.children.push(suite);\n\n const parentSuite = currentSuite;\n currentSuite = suite;\n suiteStack.push(suite);\n\n fn();\n\n suiteStack.pop();\n currentSuite = parentSuite;\n }\n\n describe.skip = function(name, fn) {\n const suite = createSuite(name, true, false);\n currentSuite.children.push(suite);\n\n const parentSuite = currentSuite;\n currentSuite = suite;\n suiteStack.push(suite);\n\n fn();\n\n suiteStack.pop();\n currentSuite = parentSuite;\n };\n\n describe.only = function(name, fn) {\n const suite = createSuite(name, false, true);\n currentSuite.children.push(suite);\n\n const parentSuite = currentSuite;\n currentSuite = suite;\n suiteStack.push(suite);\n\n fn();\n\n suiteStack.pop();\n currentSuite = parentSuite;\n };\n\n function test(name, fn) {\n currentSuite.tests.push({\n name,\n fn,\n skip: false,\n only: false,\n });\n }\n\n test.skip = function(name, fn) {\n currentSuite.tests.push({\n name,\n fn,\n skip: true,\n only: false,\n });\n };\n\n test.only = function(name, fn) {\n currentSuite.tests.push({\n name,\n fn,\n skip: false,\n only: true,\n });\n };\n\n test.todo = function(name) {\n currentSuite.tests.push({\n name,\n fn: null,\n skip: false,\n only: false,\n todo: true,\n });\n };\n\n const it = test;\n it.skip = test.skip;\n it.only = test.only;\n it.todo = test.todo;\n\n // ============================================================\n // Lifecycle Hooks\n // ============================================================\n\n function beforeEach(fn) {\n currentSuite.beforeEach.push(fn);\n }\n\n function afterEach(fn) {\n currentSuite.afterEach.push(fn);\n }\n\n function beforeAll(fn) {\n currentSuite.beforeAll.push(fn);\n }\n\n function afterAll(fn) {\n currentSuite.afterAll.push(fn);\n }\n\n // ============================================================\n // Mock Implementation\n // ============================================================\n\n const mock = {\n fn(implementation) {\n const mockState = createMockState();\n let defaultImpl = implementation;\n const onceImpls = [];\n const onceReturns = [];\n let returnVal, resolvedVal, rejectedVal;\n let returnSet = false, resolvedSet = false, rejectedSet = false;\n\n function mockFn(...args) {\n mockState.calls.push(args);\n mockState.contexts.push(this);\n mockState.lastCall = args;\n mockState.invocationCallOrder.push(++__mockCallOrder);\n\n let result;\n try {\n if (onceImpls.length > 0) {\n result = onceImpls.shift().apply(this, args);\n } else if (onceReturns.length > 0) {\n result = onceReturns.shift();\n } else if (returnSet) {\n result = returnVal;\n } else if (resolvedSet) {\n result = Promise.resolve(resolvedVal);\n } else if (rejectedSet) {\n result = Promise.reject(rejectedVal);\n } else if (defaultImpl) {\n result = defaultImpl.apply(this, args);\n }\n mockState.results.push({ type: 'return', value: result });\n return result;\n } catch (e) {\n mockState.results.push({ type: 'throw', value: e });\n throw e;\n }\n }\n\n mockFn.__isMockFunction = true;\n mockFn.mock = mockState;\n\n // Configuration methods\n mockFn.mockReturnValue = (v) => { returnVal = v; returnSet = true; return mockFn; };\n mockFn.mockReturnValueOnce = (v) => { onceReturns.push(v); return mockFn; };\n mockFn.mockResolvedValue = (v) => { resolvedVal = v; resolvedSet = true; return mockFn; };\n mockFn.mockRejectedValue = (v) => { rejectedVal = v; rejectedSet = true; return mockFn; };\n mockFn.mockImplementation = (fn) => { defaultImpl = fn; return mockFn; };\n mockFn.mockImplementationOnce = (fn) => { onceImpls.push(fn); return mockFn; };\n\n // Clearing methods\n mockFn.mockClear = () => {\n mockState.calls = []; mockState.results = []; mockState.contexts = [];\n mockState.instances = []; mockState.invocationCallOrder = []; mockState.lastCall = undefined;\n return mockFn;\n };\n mockFn.mockReset = () => {\n mockFn.mockClear();\n defaultImpl = undefined; returnVal = resolvedVal = rejectedVal = undefined;\n returnSet = resolvedSet = rejectedSet = false;\n onceImpls.length = 0; onceReturns.length = 0;\n return mockFn;\n };\n mockFn.mockRestore = () => mockFn.mockReset();\n\n __mockRegistry.push(mockFn);\n return mockFn;\n },\n\n spyOn(object, methodName) {\n const original = object[methodName];\n if (typeof original !== 'function') {\n throw new Error(\\`Cannot spy on \\${methodName}: not a function\\`);\n }\n const spy = mock.fn(original);\n spy.__originalMethod = original;\n spy.__spyTarget = object;\n spy.__spyMethodName = methodName;\n spy.__isSpyFunction = true;\n spy.mockRestore = () => {\n object[methodName] = original;\n const idx = __mockRegistry.indexOf(spy);\n if (idx !== -1) __mockRegistry.splice(idx, 1);\n return spy;\n };\n object[methodName] = spy;\n return spy;\n },\n\n clearAllMocks() {\n for (const fn of __mockRegistry) fn.mockClear();\n },\n\n resetAllMocks() {\n for (const fn of __mockRegistry) fn.mockReset();\n },\n\n restoreAllMocks() {\n for (let i = __mockRegistry.length - 1; i >= 0; i--) {\n if (__mockRegistry[i].__isSpyFunction) __mockRegistry[i].mockRestore();\n }\n },\n };\n\n // ============================================================\n // Test Runner Helpers\n // ============================================================\n\n function checkForOnly(suite) {\n if (suite.only) return true;\n for (const t of suite.tests) {\n if (t.only) return true;\n }\n for (const child of suite.children) {\n if (checkForOnly(child)) return true;\n }\n return false;\n }\n\n function suiteHasOnly(suite) {\n if (suite.only) return true;\n for (const t of suite.tests) {\n if (t.only) return true;\n }\n for (const child of suite.children) {\n if (suiteHasOnly(child)) return true;\n }\n return false;\n }\n\n function countTests(suite, hasOnly) {\n let count = 0;\n if (hasOnly && !suiteHasOnly(suite)) return 0;\n if (suite.skip) return suite.tests.length;\n\n for (const t of suite.tests) {\n if (hasOnly && !t.only && !suite.only) continue;\n count++;\n }\n for (const child of suite.children) {\n count += countTests(child, hasOnly);\n }\n return count;\n }\n\n function countSuites(suite, hasOnly) {\n let count = 0;\n if (hasOnly && !suiteHasOnly(suite)) return 0;\n\n for (const child of suite.children) {\n count++;\n count += countSuites(child, hasOnly);\n }\n return count;\n }\n\n // ============================================================\n // Test Runner\n // ============================================================\n\n async function __runAllTests() {\n const testResults = [];\n const suiteResults = [];\n const hasOnly = checkForOnly(rootSuite);\n const runStart = Date.now();\n\n // Emit runStart\n const testCount = countTests(rootSuite, hasOnly);\n const suiteCount = countSuites(rootSuite, hasOnly);\n emitEvent({ type: 'runStart', testCount, suiteCount });\n\n async function runSuite(suite, parentHooks, pathArray, depth) {\n // Skip if this suite doesn't have any .only when .only exists elsewhere\n if (hasOnly && !suiteHasOnly(suite)) return;\n\n const suitePath = [...pathArray];\n const fullName = suitePath.join(' > ');\n const suiteInfo = {\n name: suite.name,\n path: suitePath.slice(0, -1),\n fullName,\n depth,\n };\n\n // Emit suiteStart (only for non-root suites)\n if (suite !== rootSuite) {\n emitEvent({ type: 'suiteStart', suite: suiteInfo });\n }\n\n const suiteStart = Date.now();\n let suitePassed = 0;\n let suiteFailed = 0;\n let suiteSkipped = 0;\n let suiteTodo = 0;\n\n // Skip if suite is marked as skip\n if (suite.skip) {\n // Mark all tests in this suite as skipped\n for (const t of suite.tests) {\n const testFullName = fullName ? fullName + ' > ' + t.name : t.name;\n const testInfo = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n };\n emitEvent({ type: 'testStart', test: testInfo });\n\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'skip',\n duration: 0,\n };\n testResults.push(testResult);\n suiteSkipped++;\n\n emitEvent({ type: 'testEnd', test: testResult });\n }\n } else {\n // Run beforeAll hooks\n for (const hook of suite.beforeAll) {\n await hook();\n }\n\n // Run tests\n for (const t of suite.tests) {\n const testFullName = fullName ? fullName + ' > ' + t.name : t.name;\n const testInfo = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n };\n\n // Skip if .only is used and this test isn't .only AND the suite doesn't have .only\n if (hasOnly && !t.only && !suite.only) continue;\n\n emitEvent({ type: 'testStart', test: testInfo });\n\n // Skip if test is marked as skip\n if (t.skip) {\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'skip',\n duration: 0,\n };\n testResults.push(testResult);\n suiteSkipped++;\n emitEvent({ type: 'testEnd', test: testResult });\n continue;\n }\n\n // Handle todo tests (no function provided)\n if (t.todo) {\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'todo',\n duration: 0,\n };\n testResults.push(testResult);\n suiteTodo++;\n emitEvent({ type: 'testEnd', test: testResult });\n continue;\n }\n\n const testStart = Date.now();\n // Reset assertion counting state before each test\n __expectedAssertions = null;\n __assertionCount = 0;\n __hasAssertionsFlag = false;\n\n try {\n // Run all beforeEach hooks (parent first, then current)\n for (const hook of [...parentHooks.beforeEach, ...suite.beforeEach]) {\n await hook();\n }\n\n // Run test\n await t.fn();\n\n // Run all afterEach hooks (current first, then parent)\n for (const hook of [...suite.afterEach, ...parentHooks.afterEach]) {\n await hook();\n }\n\n // Verify assertion counts after test passes\n if (__hasAssertionsFlag && __assertionCount === 0) {\n throw new TestError('Expected at least one assertion', 'hasAssertions', '>0', 0);\n }\n if (__expectedAssertions !== null && __assertionCount !== __expectedAssertions) {\n throw new TestError(\n \\`Expected \\${__expectedAssertions} assertions, got \\${__assertionCount}\\`,\n 'assertions', __expectedAssertions, __assertionCount\n );\n }\n\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'pass',\n duration: Date.now() - testStart,\n };\n testResults.push(testResult);\n suitePassed++;\n emitEvent({ type: 'testEnd', test: testResult });\n } catch (err) {\n const testError = {\n message: err.message || String(err),\n stack: err.stack,\n };\n // If it's a TestError, include matcher info\n if (err.matcherName !== undefined) {\n testError.matcherName = err.matcherName;\n testError.expected = err.expected;\n testError.actual = err.actual;\n }\n const testResult = {\n name: t.name,\n suitePath: suitePath,\n fullName: testFullName,\n status: 'fail',\n duration: Date.now() - testStart,\n error: testError,\n };\n testResults.push(testResult);\n suiteFailed++;\n emitEvent({ type: 'testEnd', test: testResult });\n }\n }\n\n // Run child suites\n for (const child of suite.children) {\n const childPath = [...suitePath, child.name];\n await runSuite(child, {\n beforeEach: [...parentHooks.beforeEach, ...suite.beforeEach],\n afterEach: [...suite.afterEach, ...parentHooks.afterEach],\n }, childPath, depth + 1);\n }\n\n // Run afterAll hooks\n for (const hook of suite.afterAll) {\n await hook();\n }\n }\n\n // Emit suiteEnd (only for non-root suites)\n if (suite !== rootSuite) {\n const suiteResult = {\n ...suiteInfo,\n passed: suitePassed,\n failed: suiteFailed,\n skipped: suiteSkipped,\n todo: suiteTodo,\n duration: Date.now() - suiteStart,\n };\n suiteResults.push(suiteResult);\n emitEvent({ type: 'suiteEnd', suite: suiteResult });\n }\n }\n\n await runSuite(rootSuite, { beforeEach: [], afterEach: [] }, [], -1);\n\n const passed = testResults.filter(r => r.status === 'pass').length;\n const failed = testResults.filter(r => r.status === 'fail').length;\n const skipped = testResults.filter(r => r.status === 'skip').length;\n const todo = testResults.filter(r => r.status === 'todo').length;\n\n const runResults = {\n passed,\n failed,\n skipped,\n todo,\n total: testResults.length,\n duration: Date.now() - runStart,\n success: failed === 0,\n suites: suiteResults,\n tests: testResults,\n };\n\n emitEvent({ type: 'runEnd', results: runResults });\n\n return JSON.stringify(runResults);\n }\n\n // ============================================================\n // Helper Functions\n // ============================================================\n\n function __hasTests() {\n function checkSuite(suite) {\n if (suite.tests.length > 0) return true;\n for (const child of suite.children) {\n if (checkSuite(child)) return true;\n }\n return false;\n }\n return checkSuite(rootSuite);\n }\n\n function __getTestCount() {\n function countInSuite(suite) {\n let count = suite.tests.length;\n for (const child of suite.children) {\n count += countInSuite(child);\n }\n return count;\n }\n return countInSuite(rootSuite);\n }\n\n // Reset function to clear state between runs\n function __resetTestEnvironment() {\n rootSuite.tests = [];\n rootSuite.children = [];\n rootSuite.beforeAll = [];\n rootSuite.afterAll = [];\n rootSuite.beforeEach = [];\n rootSuite.afterEach = [];\n currentSuite = rootSuite;\n suiteStack.length = 0;\n suiteStack.push(rootSuite);\n // Clear mocks\n __mockCallOrder = 0;\n mock.restoreAllMocks();\n __mockRegistry.length = 0;\n }\n\n function __setEventCallback(callback) {\n eventCallback = callback;\n }\n\n // ============================================================\n // Expose Globals\n // ============================================================\n\n globalThis.describe = describe;\n globalThis.test = test;\n globalThis.it = it;\n globalThis.expect = expect;\n globalThis.beforeEach = beforeEach;\n globalThis.afterEach = afterEach;\n globalThis.beforeAll = beforeAll;\n globalThis.afterAll = afterAll;\n globalThis.mock = mock;\n globalThis.jest = mock; // Jest compatibility alias\n globalThis.__runAllTests = __runAllTests;\n globalThis.__resetTestEnvironment = __resetTestEnvironment;\n globalThis.__hasTests = __hasTests;\n globalThis.__getTestCount = __getTestCount;\n globalThis.__setEventCallback = __setEventCallback;\n})();\n`;\n\n/**\n * Setup test environment primitives in an isolated-vm context\n *\n * Provides Jest/Vitest-compatible test primitives:\n * - describe, test, it\n * - beforeEach, afterEach, beforeAll, afterAll\n * - expect matchers\n *\n * @example\n * const handle = await setupTestEnvironment(context, {\n * onEvent: (event) => console.log(event),\n * });\n *\n * await context.eval(`\n * describe(\"my tests\", () => {\n * test(\"example\", () => {\n * expect(1 + 1).toBe(2);\n * });\n * });\n * `);\n */\nexport async function setupTestEnvironment(\n context: ivm.Context,\n options?: TestEnvironmentOptions\n): Promise<TestEnvironmentHandle> {\n context.evalSync(testEnvironmentCode);\n\n // Set up event callback if provided\n if (options?.onEvent) {\n const eventCallbackRef = new IsolatedVM.Reference((eventJson: string) => {\n try {\n const event = JSON.parse(eventJson);\n options.onEvent!(event);\n } catch {\n // Ignore parse errors\n }\n });\n\n const global = context.global;\n global.setSync(\"__eventCallbackRef\", eventCallbackRef);\n context.evalSync(`\n __setEventCallback((eventJson) => {\n __eventCallbackRef.applySync(undefined, [eventJson]);\n });\n `);\n }\n\n return {\n dispose() {\n // Reset the test environment state\n try {\n context.evalSync(\"__resetTestEnvironment()\");\n } catch {\n // Context may already be released\n }\n },\n };\n}\n\n/**\n * Run tests in the context and return results\n */\nexport async function runTests(context: ivm.Context): Promise<RunResults> {\n const resultJson = await context.eval(\"__runAllTests()\", { promise: true });\n return JSON.parse(resultJson as string);\n}\n\n/**\n * Check if any tests are registered\n */\nexport function hasTests(context: ivm.Context): boolean {\n return context.evalSync(\"__hasTests()\") as boolean;\n}\n\n/**\n * Get the count of registered tests\n */\nexport function getTestCount(context: ivm.Context): number {\n return context.evalSync(\"__getTestCount()\") as number;\n}\n"
6
6
  ],
7
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACuB,IAAvB;AAmGA,IAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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