Nuxt/examples/jest-puppeteer
Rafał Chłodnicki 9e966a8f3c
chore(examples): use `2.x` version of nuxt instead of latest (#19737)
2023-03-16 06:24:27 -07:00
..
pages refactor: update eslint-config to 1.x 2019-07-10 15:15:49 +04:30
test feat: jest-puppeteer example (#4163) 2018-10-25 19:44:09 +02:00
README.md doc: create/update README.mds for examples (#4980) 2019-02-08 15:48:30 +01:00
jest-puppeteer.config.js feat: jest-puppeteer example (#4163) 2018-10-25 19:44:09 +02:00
jest.config.js feat: jest-puppeteer example (#4163) 2018-10-25 19:44:09 +02:00
package.json chore(examples): use `2.x` version of nuxt instead of latest (#19737) 2023-03-16 06:24:27 -07:00

README.md

Nuxt with Jest and Puppeteer

Jest is a delightful JavaScript Testing Framework with a focus on simplicity.

Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol.

Install deps

npm install

Run tests

npm run test

It will

  • Build app
  • Run server
  • Run tests

Output

 PASS  test/index.spec.js
  Index page
    √ test index title (53ms)
    √ test navigate to about page (2ms)

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total
Snapshots:   2 passed, 2 total
Time:        0.992s, estimated 1s
Ran all test suites.

Check configuration files:

  • jest.config.js
  • jest-puppeteer.config.js

Documentation