项目
在 GitHub 查看
mochajs/mocha-examples
关于
Working examples of common configurations using mocha ☕️
学习与教育实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Mocha examples
A set of examples to help demonstrate common configurations using Mocha. They should all run out-the-box.
Examples
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
- Global Fixture
- 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
@nubjs/loader - TypeScript with
tsx's ESM import - TypeScript, Babel
- Vue and Puppeteer application
Adding a new example
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 testwill automatically be run in CI).
Linting
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 .
Requirements
Each example application will have its own package dependencies but also a version of Node.js it was designed and built from.
Reporting a bug?
Feel free to send a branch to supply an MCVE from one of the applications.
探索相关项目
加载中…