esmocha

[Mocha](https://mochajs.org) wrapper with built-in [typescript](https://github.com/node-loaders/loaders/tree/main/workspaces/esbuild), built-in [expect](https://jestjs.io/docs/expect) with [mock](https://github.com/node-loaders/loaders/tree/main/workspace

18 个版本
安装
npm install esmocha
yarn add esmocha
pnpm add esmocha
bun add esmocha
README

esmocha

Mocha wrapper with built-in typescript, built-in expect with mock and snapshot support.

Usage

npm install esmocha --save-dev

esmocha executable is a wrapper for mocha executable, every option should work.

npx esmocha

Every method is re-exported.

// expect lib
import { expect } from 'esmocha';
// mocking lib
import { mock, resetAllMocks } from 'esmocha';
// mocha lib
import { afterAll, beforeAll } from 'esmocha';

Updating expect snapshots:

npx esmocha --update-snapshot

License

MIT

版本列表
5.0.0 2025-12-13
4.0.0 2025-08-13
3.0.0 2024-12-06
2.3.0 2024-10-15
2.2.0 2024-10-15
2.1.1 2024-10-15
2.1.0 2024-10-15
2.0.0 2024-10-14
1.2.0 2023-12-29
1.1.1 2023-10-26
1.1.0 2023-10-25
1.0.1 2023-05-11
1.0.0 2023-05-11
0.1.4 2023-05-05
0.1.3 2023-05-05
0.1.2 2023-05-04
0.1.1 2023-05-04
0.1.0 2023-05-04