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

False negative when tests are run under a debugger #143

Open
justingrant opened this issue Sep 13, 2021 · 0 comments
Open

False negative when tests are run under a debugger #143

justingrant opened this issue Sep 13, 2021 · 0 comments

Comments

@justingrant
Copy link

Node (see nodejs/node#34799) emits console output when running tests under a debugger (e.g. VS Code's IDE debugger).

Debugger attached.\n is emitted at the beginning of the test, and Waiting for the debugger to disconnect...\n is emitted at the end.

test262-harness reports this as a test failure. I assume this is because "no console output" is considered a success while "some output" is considered a failure?

We can work around it (e.g. tc39/proposal-temporal#1812) but it might be better to work around it here.

Here's the code I've proposed for Temporal's workaround:

    if (result.message === 'Debugger attached.\nWaiting for the debugger to disconnect...\n') {
      // work around https://github.com/nodejs/node/issues/34799 when running tests in the debugger
      result.message = '';
      result.pass = true;
    }
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

1 participant