{"library":"mocha","type":"library","category":null,"description":"Mocha is a highly flexible and feature-rich JavaScript test framework designed for both Node.js environments and browsers. It facilitates writing and running tests with support for various styles, including Behavior Driven Development (BDD) and Test Driven Development (TDD). The current stable version is 11.7.5, with frequent beta releases for version 12 indicating active development. Mocha differentiates itself by being unopinionated about the assertion library, allowing developers to choose their preferred tools (e.g., Chai, Node's built-in `assert`). It provides robust capabilities for asynchronous testing, hooks for setup/teardown, and comprehensive reporting, making it a popular choice for defining test suites and individual test cases.","language":"javascript","status":"active","version":"11.7.5","tags":["javascript","mocha","test","bdd","tdd","tap","testing","chai","assertion"],"install":[{"cmd":"npm install mocha","imports":["// No import needed, these are global by default in Mocha tests.\n// For TypeScript, install @types/mocha and configure tsconfig for 'types'.","import Mocha from 'mocha';\n// or\nconst Mocha = require('mocha');","// In package.json: { \"type\": \"module\" }\nimport { myFunction } from './myModule.js';\n\ndescribe('ESM Test', () => {\n  it('should run an ES module test', () => {\n    // ...\n  });\n});"]},{"cmd":"yarn add mocha","imports":[]},{"cmd":"pnpm add mocha","imports":[]}],"homepage":"https://mochajs.org","github":"https://github.com/mochajs/mocha","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/mocha","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/mocha/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}