import { CoreRuntime } from '@faunosteo/core-wasm' import { nodeCoreRuntime } from '@faunosteo/core-wasm/node' /** A loaded runtime on the shipped build (the package's Node source). */ export function testCoreRuntime(): Promise { return nodeCoreRuntime('pkg') } /** A runtime whose module never loads (CSP refusal, network failure). */ export function unavailableCoreRuntime(): CoreRuntime { return new CoreRuntime({ compile: () => Promise.reject(new WebAssembly.CompileError('blocked')), importGlue: () => Promise.reject(new TypeError('blocked')), }) }