Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 2.89 KB

File metadata and controls

79 lines (63 loc) · 2.89 KB
id title sidebar_label
install
Install
Install

This module is distributed via npm and should be installed as one of your project's devDependencies:

npm install --save-dev @testing-library/web

Wrappers

If you are using a framework or library such as React, you will likely want to install the wrapper:

Ecosystem

Web Testing Library works well with these companion libraries:

Main Exports

You can review the Web Testing Library package.json here.

In particular, the main, module, and umd:main fields are useful. Each of these points to a file that's useful in certain situations. Typically, your testing framework will resolve to the correct one for your situation, but if it does not, then you can either configure your testing framework to resolve to the right file when you require/import @testing-library/dom or you can import the file you need more explicitly. For example:

import {waitFor} from '@testing-library/web/dist/@testing-library/web.umd.js'

You can review the published dist files here.

The main file is configured to compile down to support the version of node that is referenced in the package.json engines.node field. But the module and umd:main files are configured to compile down to support browsers as old as IE 10.