Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh_testing_library/components.ts

Utilities for testing fresh apps
Latest
import * as freshTestingLibrary from "https://deno.land/x/fresh_testing_library@0.13.1/components.ts";

A thin wrapper to [@testing-library/preact]https://github.com/testing-library/preact-testing-library and [@testing-library/user-event]https://github.com/testing-library/user-event for testing island components.

Functions

Unmounts Preact trees that were mounted with render.

Returns a presentation string of your val object

Returns a presentation string of your val object

Render into a container which is appended to document.body. It should be used with cleanup.

Allows you to render a hook within a test React component without having to create that component yourself.

This function sets up the DOM environment to make Testing Library work.

Type Aliases

Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

query methods have a common call signature. Only the return type differs.

query methods have a common call signature. Only the return type differs.