https://github.com/nickserv/jest-environment-url
Load a URL into JSDOM for testing
https://github.com/nickserv/jest-environment-url
jest jsdom testing
Last synced: 2 months ago
JSON representation
Load a URL into JSDOM for testing
- Host: GitHub
- URL: https://github.com/nickserv/jest-environment-url
- Owner: nickserv
- Created: 2022-08-12T00:48:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T03:27:21.000Z (over 3 years ago)
- Last Synced: 2026-04-15T08:38:12.528Z (3 months ago)
- Topics: jest, jsdom, testing
- Language: TypeScript
- Homepage: https://npm.im/jest-environment-url
- Size: 1.33 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `jest-environment-url`
Load a URL into JSDOM for testing
## Status
This is an experiment that hasn't been extensively tested yet, but feedback is welcome
## Installation
```sh
npm install --save-dev jest-environment-url
```
```sh
yarn add --dev jest-environment-url
```
## Configuration
### JSON
```json
"testEnvironment": "jest-environment-url",
"testEnvironmentOptions": {
"url": "https://example.com/"
}
```
### DocBlock
```js
/**
* @jest-environment url
* @jest-environment-options {"url": "https://example.com/"}
*/
```
## [Example](test.ts)
## Inspiration
Based on [`jest-environment-jsdom`](https://github.com/facebook/jest/tree/main/packages/jest-environment-jsdom) (© Facebook with [MIT license](https://choosealicense.com/licenses/mit/))