Skip to content

🐛 Bug: https://mochajs.org/example/tests now has 'expect is not defined' failures in all tests #5244

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

https://mochajs.org/example/tests

Screenshot of a Mocha browser test report showing 'ReferenceError: expect is not defined' for all tests

In the browser console, we get:

Uncaught SyntaxError: Unexpected token 'export'
tests:28 Uncaught ReferenceError: chai is not defined
    at tests:28:13

Looks like this is from https://unpkg.com/chai/chai.js bringing in the latest Chai versions that only support ESM.

Metadata

Metadata

Labels

area: websiteinvolving mochajs.org, but not necessarily involving docsstatus: accepting prsMocha can use your help with this one!type: buga defect, confirmed by a maintainer

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions