-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Run Mocha tests from within existing Node.js code #2314
Comments
"node-able" test files are a goal for the future; see #1969 and work done in mocha-core. as such, closing this as a dupe |
That #1969 is quite useless if one wants to figure out how to run mocha tests as a regular nodejs app. Any clue? |
I'm experiencing this as well in vs code with node, selenium & mocha. Looking for a solution. Thanks. |
+1 TypeError: describe is not a function even when using: let mocha = require('mocha') |
I'd love the feature explained by @lastmjs too. I am using AWS SDK to query infrastructure resources that I'd like to assert afterwords |
this is how i got it working within electron AND i just found out the way to re-run tests! turns out there is a bug in the options parser
mochaTest.js:
|
It would be nice to be able to run Mocha tests from within normal Node.js code. Here's what I'm talking about:
Or maybe a template string could work if we had to:
I'm running into problems with the limitations of only being able to run Mocha tests by loading stand-alone files. I'm trying to get some interesting test environments working inside of Electron and with web components.
The text was updated successfully, but these errors were encountered: