import { Engine } from 'ox/wasm' import { expectTypeOf, test } from 'vp/test' import * as CoreEngine from '../../core/Engine.js' type Installed = Awaited> type Uninstalled = Awaited> test('install and engine expose the same precise engine', () => { expectTypeOf().toEqualTypeOf() expectTypeOf().toEqualTypeOf< (input: Uint8Array) => Uint8Array >() expectTypeOf().not.toHaveProperty('scrypt') expectTypeOf().not.toHaveProperty('randomSecretKey') expectTypeOf().not.toHaveProperty('randomSecretKey') }) test('the WASM Engine namespace exposes synchronous core operations', () => { expectTypeOf().toEqualTypeOf() expectTypeOf(Engine.get).toEqualTypeOf(CoreEngine.get) expectTypeOf(Engine.InvalidSlotValueError).toEqualTypeOf( CoreEngine.InvalidSlotValueError, ) expectTypeOf(Engine.reset).toEqualTypeOf(CoreEngine.reset) expectTypeOf(Engine.set).toEqualTypeOf(CoreEngine.set) expectTypeOf(Engine.with).toEqualTypeOf(CoreEngine.with) }) test('the replaced aliases are absent', () => { expectTypeOf().not.toHaveProperty('create') expectTypeOf().not.toHaveProperty('load') })