Skip to content

Commit 7dcee7f

Browse files
committed
sync some global and pure tests
1 parent 1a207ea commit 7dcee7f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/unit-pure/es.string.match-all.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ QUnit.test('String#matchAll', assert => {
128128

129129
assert.throws(() => matchAll(Symbol('matchAll test'), /./), 'throws on symbol context');
130130

131+
if (!Symbol.sham) {
132+
assert.throws(() => matchAll('a', Symbol('matchAll test')), 'throws on symbol argument');
133+
}
134+
131135
if (STRICT) {
132136
assert.throws(() => matchAll(null, /./g), TypeError, 'Throws on null as `this`');
133137
assert.throws(() => matchAll(undefined, /./g), TypeError, 'Throws on undefined as `this`');

tests/unit-pure/es.suppressed-error.constructor.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ QUnit.test('SuppressedError', assert => {
1616
assert.same(SuppressedError().suppressed, undefined);
1717
assert.same(SuppressedError().message, '');
1818
assert.same(SuppressedError().cause, undefined);
19+
assert.false('cause' in SuppressedError());
1920
assert.same(SuppressedError().name, 'SuppressedError');
2021

2122
assert.same(new SuppressedError().error, undefined);
2223
assert.same(new SuppressedError().suppressed, undefined);
2324
assert.same(new SuppressedError().message, '');
2425
assert.same(new SuppressedError().cause, undefined);
26+
assert.false('cause' in new SuppressedError());
2527
assert.same(new SuppressedError().name, 'SuppressedError');
2628

2729
const error1 = SuppressedError(1, 2, 3, { cause: 4 });
@@ -30,6 +32,7 @@ QUnit.test('SuppressedError', assert => {
3032
assert.same(error1.suppressed, 2);
3133
assert.same(error1.message, '3');
3234
assert.same(error1.cause, undefined);
35+
assert.false('cause' in error1);
3336
assert.same(error1.name, 'SuppressedError');
3437

3538
const error2 = new SuppressedError(1, 2, 3, { cause: 4 });
@@ -38,6 +41,7 @@ QUnit.test('SuppressedError', assert => {
3841
assert.same(error2.suppressed, 2);
3942
assert.same(error2.message, '3');
4043
assert.same(error2.cause, undefined);
44+
assert.false('cause' in error2);
4145
assert.same(error2.name, 'SuppressedError');
4246

4347
assert.throws(() => SuppressedError(1, 2, Symbol('SuppressedError constructor test')), 'throws on symbol as a message');

0 commit comments

Comments
 (0)