Skip to content

Latest commit

 

History

History
192 lines (104 loc) · 4.88 KB

TestQuickJSWASMModule.md

File metadata and controls

192 lines (104 loc) · 4.88 KB

quickjs-emscriptenquickjs-emscriptenReadme | Exports


quickjs-emscripten / quickjs-emscripten / TestQuickJSWASMModule

Class: TestQuickJSWASMModule

A test wrapper of QuickJSWASMModule that keeps a reference to each context or runtime created.

Call disposeAll to reset these sets and calls dispose on any left alive (which may throw an error).

Call assertNoMemoryAllocated at the end of a test, when you expect that you've freed all the memory you've ever allocated.

Contents

Implements

Constructors

new TestQuickJSWASMModule(parent)

new TestQuickJSWASMModule(parent): TestQuickJSWASMModule

Parameters

parent: QuickJSWASMModule

Returns

TestQuickJSWASMModule

Source

packages/quickjs-emscripten-core/src/module-test.ts:21

Properties

contexts

contexts: Set<QuickJSContext>

Source

packages/quickjs-emscripten-core/src/module-test.ts:19


runtimes

runtimes: Set<QuickJSRuntime>

Source

packages/quickjs-emscripten-core/src/module-test.ts:20

Methods

assertNoMemoryAllocated()

assertNoMemoryAllocated(): void

Returns

void

Source

packages/quickjs-emscripten-core/src/module-test.ts:62


disposeAll()

disposeAll(): void

Returns

void

Source

packages/quickjs-emscripten-core/src/module-test.ts:51


evalCode()

evalCode(code, options?): unknown

Parameters

code: string

options?: ModuleEvalOptions

Returns

unknown

Implementation of

Pick.evalCode

Source

packages/quickjs-emscripten-core/src/module-test.ts:47


getWasmMemory()

getWasmMemory(): Memory

Returns

Memory

Implementation of

Pick.getWasmMemory

Source

packages/quickjs-emscripten-core/src/module-test.ts:79


newContext()

newContext(options?): QuickJSContext

Parameters

options?: ContextOptions

Returns

QuickJSContext

Implementation of

Pick.newContext

Source

packages/quickjs-emscripten-core/src/module-test.ts:35


newRuntime()

newRuntime(options?): QuickJSRuntime

Parameters

options?: RuntimeOptions

Returns

QuickJSRuntime

Implementation of

Pick.newRuntime

Source

packages/quickjs-emscripten-core/src/module-test.ts:23


Generated using typedoc-plugin-markdown and TypeDoc