Skip to content

Add a built-in require interface without globals#5995

Open
lo1tuma wants to merge 2 commits into
mochajs:mainfrom
lo1tuma:issue-956-require-interface
Open

Add a built-in require interface without globals#5995
lo1tuma wants to merge 2 commits into
mochajs:mainfrom
lo1tuma:issue-956-require-interface

Conversation

@lo1tuma

@lo1tuma lo1tuma commented May 22, 2026

Copy link
Copy Markdown

PR Checklist

Overview

This adds require as a built-in interface so --ui require and ui: require work consistently from both the CLI and config files.

The interface keeps Mocha's DSL helpers off the global object and exposes the function-style APIs through require("mocha") and import { ... } from "mocha", including mixed BDD/TDD usage such as it with suite.

It also fills in the missing require-interface exports, extends the require-interface coverage to exercise the full callable API surface, updates --list-interfaces, and refreshes the docs for the require interface.

@github-actions

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature: Export all BDD functions for "require interface" 🛠️ Repo: Test "require interface" 🚀 Feature: opt-out of globals

1 participant