New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to run Mocha tests with node-schedule npm module #2887
Comments
I'm not familiar with mocha-runner-reporter, but if it uses Mocha's programmatic API and isn't doing anything to work around Mocha's known issues with running the programmatic API multiple times then you might have to apply some of those workarounds yourself if possible (e.g. see if it works if you clear the require cache before each run). Let me know if that works for you! |
@ScottFreeCode Thank you for the reply. I have tried all workarounds mentioned in above comment. This work around solved my problem. |
Awesome! Glad that worked. I'm going to go ahead and close this since we have those other issues for the same problem already, but feel free to participate there if you have any new ideas, suggestions or questions! |
@manikumar446 Could you post your updated or modified sample code if possible. Still facing the issue. |
I've setup a suite of tests in mocha using Sinon and Chai.
What I'm aiming for is that the tests will run daily and then email the results to my team.
So I installed below npm modules,
--> node-schedule: To run tests daily
--> mocha-runner-reporter: To send the test report as email.
The tests are all running and sending email as expected only first time. From second time on wards it's neither running the tests nor sending email. I have attached the sample project as well.
i'd appreciate any suggestions.
Samplecode.zip
The text was updated successfully, but these errors were encountered: