jstest

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalNodeScript

func EvalNodeScript[T any](t testing.TB, script string, dir string, args ...string) (result T, err error)

EvalNodeScript imports a Node.js script that deafult-exports a single function, calls it with the provided arguments, and unmarshals the JSON-stringified awaited return value into T.

func EvalNodeScriptWithTS

func EvalNodeScriptWithTS[T any](t testing.TB, script string, dir string, args ...string) (result T, err error)

EvalNodeScriptWithTS is like EvalNodeScript, but provides the TypeScript library to the script as the first argument.

func SkipIfNoNodeJS

func SkipIfNoNodeJS(t testing.TB)

Types

This section is empty.

Jump to

Keyboard shortcuts

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