Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does mocha have a testing live mode?

Tags:

mocha.js

I am doing TDD with mocha and chai to test some NodeJS scripts, and I have to run "mocha" every time that I want to run the test again.

Is there a way to setup mocha and chai to run the test just after I save the source file? like an option "mocha -–live-reload" (that is just an example...)

like image 902
Pablo Ezequiel Inchausti Avatar asked Mar 05 '26 12:03

Pablo Ezequiel Inchausti


1 Answers

According to the docs, the --watch flag should do this.

like image 169
Matthew Daly Avatar answered Mar 08 '26 21:03

Matthew Daly



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!