https://github.com/adaptlearning/jest-environment-adapt
jest environment for Adapt
https://github.com/adaptlearning/jest-environment-adapt
Last synced: 11 months ago
JSON representation
jest environment for Adapt
- Host: GitHub
- URL: https://github.com/adaptlearning/jest-environment-adapt
- Owner: adaptlearning
- Created: 2023-06-06T19:39:36.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T11:19:35.000Z (over 2 years ago)
- Last Synced: 2024-04-25T17:43:58.744Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
Awesome Lists containing this project
README
# jest-environment-adapt
Setup jest using jsdom. Support Adapt plugin mocking. Allow jsdom to load resources from Adapt's build output. Fix missing apis on jsdom window. Force jest to wait for Adapt to load correctly.
Supports loading Adapt into a node jsdom environment for unit testing.
### Config in `jest.config.json`
```json
{
"testEnvironment": "jest-environment-adapt",
"testEnvironmentOptions": {
"pluginsMockFile": "./test/unit/__mocks__/plugins.js"
}
}
```
### Programmic config
```js
const config = require('./jest.config');
config.testEnvironmentOptions.outputDir = "./build/";
```