Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rwu823/ts-jest-puppeteer
:repeat: Run your tests using Jest & Puppeteer with TypeScript.
https://github.com/rwu823/ts-jest-puppeteer
jest puppeteer typescript
Last synced: about 1 month ago
JSON representation
:repeat: Run your tests using Jest & Puppeteer with TypeScript.
- Host: GitHub
- URL: https://github.com/rwu823/ts-jest-puppeteer
- Owner: rwu823
- Created: 2020-02-10T01:27:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:36:21.000Z (about 1 year ago)
- Last Synced: 2024-10-29T00:43:02.577Z (about 2 months ago)
- Topics: jest, puppeteer, typescript
- Language: JavaScript
- Homepage:
- Size: 1.33 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ts-jest-puppeteer
## Installation
~~~sh
yarn add -D ts-jest-puppeteer
~~~## Usage
~~~js
// jest.config.jsmodule.exports = {
preset: 'ts-jest-puppeteer'
}
~~~## Launch Options
You can custom your puppeteer [launch option](https://pptr.dev/#?product=Puppeteer&version=v2.0.0&show=api-puppeteerlaunchoptions) thro `PUPPETEER_LAUNCH_CONFIG` env. The default value is `puppeteer-launch.js`~~~js
// puppeteer-launch.jsmodule.export = {
// launch options
}
~~~~~~sh
$ PUPPETEER_LAUNCH_CONFIG=puppeteer-launch.js jest
~~~## Example
~~~js
// google.spec.tsdescribe('Google', () => {
beforeAll(async () => {
await page.goto('https://google.com')
})it('should display "google" text on page', async () => {
await expect(page).toMatch('google')
})
})
~~~