Nuxt/examples/jest-puppeteer
Clark Du 52a92fbc48 refactor: use PascalCase for components names (#4396) 2018-11-24 22:19:19 +03:30
..
pages refactor: use PascalCase for components names (#4396) 2018-11-24 22:19:19 +03:30
test feat: jest-puppeteer example (#4163) 2018-10-25 19:44:09 +02:00
README.md feat: jest-puppeteer example (#4163) 2018-10-25 19:44:09 +02: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 feat: jest-puppeteer example (#4163) 2018-10-25 19:44:09 +02:00

README.md

Example how to test Nuxt.js app with Jest and Puppeteer

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