-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
consoleIssues and PRs related to the console subsystem.Issues and PRs related to the console subsystem.regressionIssues related to regressions.Issues related to regressions.
Milestone
Description
- Version:
10.0.0-rc.0 - Platform:
macOS - Subsystem:
console
See the following file:
const {Console} = require('console');
class MyConsole extends Console {
hello() {}
}
const cons = new MyConsole(process.stdout);
console.log(cons.hello)This will log [Function: hello] in node 8 and node 9, but undefined in the RC.
I'm not sure if it's supposed to happen - my only guess from looking at the changelog is #17708, but I'm not sure if it's it?
This completely breaks Jest (which I wanted to test using the RC) as it extends Console for its own logging. See https://github.com/facebook/jest/blob/ef8f9ce4e02397dc75bdd510079bbfb36ad06728/packages/jest-util/src/buffered_console.js#L164-L166 which is undefined, meaning Jest errors out on an internal error here: https://github.com/facebook/jest/blob/ef8f9ce4e02397dc75bdd510079bbfb36ad06728/packages/jest-runner/src/run_test.js#L137
Metadata
Metadata
Assignees
Labels
consoleIssues and PRs related to the console subsystem.Issues and PRs related to the console subsystem.regressionIssues related to regressions.Issues related to regressions.