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

Deprecate chalk.constructor() in favor of new chalk.Instance() #322

Merged
merged 10 commits into from
Mar 12, 2019
Prev Previous commit
Update error message
  • Loading branch information
tom-sherman committed Mar 12, 2019
commit fc504931b4dc882efb0b8fefdd89ad88e9c0901e
2 changes: 1 addition & 1 deletion test/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('Chalk.constructor should throw an expected error', t => {
chalk.constructor();
});

t.is(expectedError.message, 'Chalk.constructor() is deprecated. Use new Chalk.Instance() instead.');
t.is(expectedError.message, '`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');

t.throws(() => {
new chalk.constructor(); // eslint-disable-line no-new
Expand Down