modulestest

package
v0.0.0-...-023a388 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package modulestest the module test vm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpServer

func HttpServer(call sobek.FunctionCall, rt *sobek.Runtime) sobek.Value

HttpServer creates an HTTP server for testing

func PromiseResult

func PromiseResult(value sobek.Value) sobek.Value

PromiseResult get the promise resolve result panic when promise reject.

Types

type VM

type VM struct{ js.VM }

func New

func New(t testing.TB, opts ...js.Option) VM

New returns a test VM instance

func (*VM) RunModule

func (vm *VM) RunModule(ctx context.Context, source string, args ...any) (ret sobek.Value, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL