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

Run and write tests for integration #4

Open
2 of 3 tasks
cmfcmf opened this issue Dec 13, 2017 · 3 comments
Open
2 of 3 tasks

Run and write tests for integration #4

cmfcmf opened this issue Dec 13, 2017 · 3 comments

Comments

@cmfcmf
Copy link
Collaborator

cmfcmf commented Dec 13, 2017

  • figure out which testing framework is used
  • run built-in node tests
  • write tests for our integration
@cmfcmf cmfcmf added this to the After winter break milestone Dec 13, 2017
@cmfcmf
Copy link
Collaborator Author

cmfcmf commented Jan 3, 2018

The "How to write a test" guide of Node.js can be found here: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md

Node.js is using Google Test for C++ unit tests, as well as simple JavaScript files as test cases. JavaScript tests look like they are preferred, but obviously can't be used for everything (i.e. embedding Node.js 😄 ).

@msoechting
Copy link
Collaborator

Current progress of tests (tests branch):

  • Running configure --shared followed by make cctest results in the following error:
Makefile:279 recipe for target test/addons/.docbuildstamp failed
  • Running configure followed by make cctest successfully executed the currently existing tests. But, when calling node::lib::Initialize() in one of the tests, the following error occurs:
bootstrap_node.js:511
  const ContextifyScript = process.binding('contextify').ContextifyScript;
                                   ^

Error: No such module: contextify
    at bootstrap_node.js:511:36

@justus-hildebrand
Copy link
Collaborator

The test/addons/.docbuildstamp target fails, because make test-only tries to run node as an executable: ./node tools/doc/addon-verify.js. When building node as a shared library, however, there is no executable to be executed, which in turn results in the tests failing.

make cctest fails for the same reason: make tries to run cctest (an executable), but it gets built as a shared lib and therfore fails. I have not looked into what cctest is, but if we manage to build it as an exe that tests the lib, maaaybe we're good to go here.

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

3 participants