@native-dom/jest-environment
v0.0.10
Published
Jest environment backed by native-dom.
Readme
@native-dom/jest-environment
Jest environment adapter for native-dom.
The environment extends jest-environment-node, calls register() from @native-dom/register during setup, and restores globals during teardown.
Usage
// jest.config.js
export default {
testEnvironment: "@native-dom/jest-environment"
};CommonJS projects can use the same package name:
module.exports = {
testEnvironment: "@native-dom/jest-environment"
};Behavior
Setup installs window, document, and the DOM globals provided by @native-dom/register. Teardown calls unregister() and removes the environment's window and document references from Jest's global object.
Development
pnpm --filter @native-dom/jest-environment build
pnpm --filter @native-dom/jest-environment typecheck
pnpm --filter @native-dom/jest-environment test