Skip to content
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

How to run node js file in opentest? #292

Closed
Naveenkumarnnk opened this issue Mar 31, 2020 · 2 comments
Closed

How to run node js file in opentest? #292

Naveenkumarnnk opened this issue Mar 31, 2020 · 2 comments

Comments

@Naveenkumarnnk
Copy link

I have a small requirement to run a node js file.
Is there any way to run it in the opentest?
can we run it in the javascript function or Opentest Script action?

@adrianth
Copy link
Contributor

The Node.js API is not available in OpenTest, so you generally cannot run Node.js modules in your tests. However, if you have a simple one-file Node.js module that doesn't use the Node.js API, you should be able to include the script in your tests using the includes syntax as described here. Keep in mind though, that it has to be a generic module that doesn't make use of the Node.js API. For example, you could include Moment.js for date/time manipulation.

@Naveenkumarnnk
Copy link
Author

Thank You @adrianth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants