jstest

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package jstest contains utilities to run device tests using the chrome JS controller API.

Index

Constants

This section is empty.

Variables

View Source
var KernelCommunicationDone = false

KernelCommunicationDone is used to determine when the get report requests by the kernel are done.

Functions

func CreateDevice

func CreateDevice(ctx context.Context, path string) (*uhid.Device, error)

CreateDevice creates the device in the given recording and initializes it.

func Gamepad

func Gamepad(ctx context.Context, s *testing.State, d *uhid.Device, replayPath, buttonMappings string, expectedButtons []string)

Gamepad runs a javascript test for the given device. It compares the buttons listed in expectedButtons with the ones produced by the recording.

Types

This section is empty.

Jump to

Keyboard shortcuts

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