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

test: remove string literals from assert.strictEqual() calls #21211

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions test/parallel/test-intl.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ if (!common.hasIntl) {
const collOpts = { sensitivity: 'base', ignorePunctuation: true };
const coll = new Intl.Collator(['en'], collOpts);

assert.strictEqual(coll.compare('blackbird', 'black-bird'), 0,
'ignore punctuation failed');
assert.strictEqual(coll.compare('blackbird', 'red-bird'), -1,
'compare less failed');
assert.strictEqual(coll.compare('bluebird', 'blackbird'), 1,
'compare greater failed');
assert.strictEqual(coll.compare('Bluebird', 'bluebird'), 0,
'ignore case failed');
assert.strictEqual(coll.compare('\ufb03', 'ffi'), 0,
'ffi ligature (contraction) failed');
// ignore punctuation failed
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Probably best to remove "failed" from this and each of the other comments. That will make it a bit clearer what is being tested.

assert.strictEqual(coll.compare('blackbird', 'black-bird'), 0);
// compare less failed
assert.strictEqual(coll.compare('blackbird', 'red-bird'), -1);
// compare greater failed
assert.strictEqual(coll.compare('bluebird', 'blackbird'), 1);
// ignore case failed
assert.strictEqual(coll.compare('Bluebird', 'bluebird'), 0);
// ffi ligature (contraction) failed
assert.strictEqual(coll.compare('\ufb03', 'ffi'), 0);
}