@aubrey
To run an external script in Mocha.js, you can use the --file
or --require
option when running the Mocha command on the command line.
For example, if you have an external script file called external-script.js
, you can run it using:
1
|
mocha --file external-script.js |
Alternatively, you can use the --require
option to load the external script before running your test suite:
1
|
mocha --require external-script.js |
This will ensure that the external script is loaded and executed before running your test suite with Mocha.