A set of examples to help demonstrate common configurations using Mocha. They should all run out-the-box.
The most straightforward example is "Hello World". Additional examples include:
- Apollo-Server GraphQL API
- Async setup with --delay
- Async setup with --file
- Babel application
- Browser
- Express REST API
- Karma
- Node Sqlite 3 example
- Playwright application
- Programmatic usage
- Puppeteer application
- React, webpack
- RxJs example
- Selenium application
- TDD
- Third party reporter
- TypeScript application
- TypeScript with
ts-node
's ESM loader - TypeScript with
tsx
's ESM import - TypeScript, Babel
- Vue and Puppeteer application
Follow the below steps:
- Clone this repo locally
- Create your folder under
packages/
- Run
npm init
- Now build your application and open a PR (its
npm test
will automatically be run in CI).
There is generally no linting requirement for each example, but we recommend running prettier. You can install and run it with:
npm install prettier
prettier --write .
Each example application will have its own package dependencies but also a version of Node.js it was designed and built from.
Feel free to send a branch to supply an MCVE from one of the applications.