1. 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
esmocha
Package: esmocha
Last modified: Fri, 29 Dec 2023 14:07:44 GMT
Version: 1.2.0
Downloads: 10,253

Install

npm install esmocha
yarn add esmocha

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';

Manual loading:

 npx mocha --require esmocha/mocha --loader esmocha/loader

Updating expect snapshots:

npx esmocha --update-snapshot

License

MIT

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code