Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esmocha

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
increased by0.79%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 26 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc