modulestest

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package modulestest the module test vm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VM

type VM struct {
	// contains filtered or unexported fields
}

VM test vm

func New

func New(t *testing.T) *VM

New returns a test VM instance

func (*VM) Run

func (vm *VM) Run(ctx context.Context, program js.Program) (goja.Value, error)

Run the js program

func (*VM) RunString

func (vm *VM) RunString(ctx context.Context, script string) (goja.Value, error)

RunString the js string

func (*VM) Runtime

func (vm *VM) Runtime() *goja.Runtime

Runtime returns the runtime

Jump to

Keyboard shortcuts

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