Skip to content

fix: fix unit tests with node v12.11.0 #5040

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

Merged
merged 1 commit into from
Sep 27, 2019
Merged

fix: fix unit tests with node v12.11.0 #5040

merged 1 commit into from
Sep 27, 2019

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Sep 27, 2019

Unit tests cannot be executed with node v12.11.0 due to the changes in util.format. If you have the following code:

const obj = { obj: 1 }
const formattedValue = util.format("%s", obj);
console.log(formattedValue);

The output with node v10.13.0 is:

[object Object]

The output with node v12.11.0 is:

{ obj: 1 }

However, the string interpolation is not changed i.e the following code:

console.log(`${obj}`)

will result in [object Object] no matter if it is executed with node v12.11.0 or earlier.

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

@cla-bot cla-bot bot added the cla: yes label Sep 27, 2019
@Fatme Fatme changed the base branch from master to release September 27, 2019 10:45
Unit tests cannot be executed with node v12.11.0 due to changes in `util.format`.
@Fatme Fatme force-pushed the fatme/fix-unit-tests branch from 1f604db to 20d7ca3 Compare September 27, 2019 10:47
@Fatme Fatme merged commit cc811f3 into release Sep 27, 2019
@Fatme Fatme deleted the fatme/fix-unit-tests branch September 27, 2019 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants