Skip to content

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Apr 6, 2020

By convention, require('util').debuglog('test') can be used
within tests to separate debug output from console.log/error
statements that are actually a part of the test. These should
be enabled by default in most cases in CI.

Running make test-ci or variants (e.g. test-ci-js) will set
the NODE_DEBUG=test option by default unless explicitly
overridden. vcbuild will set NODE_DEBUG=test automatically
unless the no-debug-test option is set.

Refs: #32678

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

By convention, `require('util').debuglog('test')` can be used
within tests to separate debug output from console.log/error
statements that are actually a part of the test. These should
be enabled by default in most cases in CI.

Signed-off-by: James M Snell <jasnell@gmail.com>
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform. labels Apr 6, 2020
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running tests locally and running them in CI should match as closely as possible for a good DX, otherwise we are bound to run into situations in which tests fail locally and pass in CI or vice versa a lot more often.

I’d either not do this, or enable it for all test situations (preferably from the test runner in that case).

@jasnell jasnell closed this Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants