Skip to content

Commit

Permalink
prefer assert.same
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 17, 2021
1 parent 844df4a commit cd62973
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/pure/esnext.string.cooked.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ QUnit.test('String.cooked', assert => {
assert.isFunction(cooked);
assert.arity(cooked, 1);
assert.name(cooked, 'cooked');
assert.strictEqual(cooked(['Hi\\n', '!'], 'Bob'), 'Hi\\nBob!', 'template is an array');
assert.strictEqual(cooked('test', 0, 1, 2), 't0e1s2t', 'template is a string');
assert.strictEqual(cooked('test', 0), 't0est', 'lacks substituting');
assert.same(cooked(['Hi\\n', '!'], 'Bob'), 'Hi\\nBob!', 'template is an array');
assert.same(cooked('test', 0, 1, 2), 't0e1s2t', 'template is a string');
assert.same(cooked('test', 0), 't0est', 'lacks substituting');

if (typeof Symbol == 'function' && !Symbol.sham) {
assert.throws(() => cooked([Symbol()]), TypeError, 'throws on symbol #1');
Expand Down
6 changes: 3 additions & 3 deletions tests/tests/esnext.string.cooked.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ QUnit.test('String.cooked', assert => {
assert.name(cooked, 'cooked');
assert.looksNative(cooked);
assert.nonEnumerable(String, 'cooked');
assert.strictEqual(cooked(['Hi\\n', '!'], 'Bob'), 'Hi\\nBob!', 'template is an array');
assert.strictEqual(cooked('test', 0, 1, 2), 't0e1s2t', 'template is a string');
assert.strictEqual(cooked('test', 0), 't0est', 'lacks substituting');
assert.same(cooked(['Hi\\n', '!'], 'Bob'), 'Hi\\nBob!', 'template is an array');
assert.same(cooked('test', 0, 1, 2), 't0e1s2t', 'template is a string');
assert.same(cooked('test', 0), 't0est', 'lacks substituting');

if (typeof Symbol == 'function' && !Symbol.sham) {
assert.throws(() => cooked([Symbol()]), TypeError, 'throws on symbol #1');
Expand Down

0 comments on commit cd62973

Please sign in to comment.