Skip to content

Mocha Breaks Libraries Using process for environment detection. #770

@iammerrick

Description

@iammerrick

Please see an example repository at https://github.com/iammerrick/mocha-rjs-fail.

The Problem

Mocha.js installs a global called process see here. A comment says it is only to allow mocha.js to run untouched, not to allow running node code in the browser, however this has some unfortunate side effects for some libraries that use process for environment detection.

r.js is one of those libraries that uses process for environment detection see here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions