diff --git a/tests/pure/es.aggregate-error.js b/tests/pure/es.aggregate-error.js index 0cc92c146393..37517c27b749 100644 --- a/tests/pure/es.aggregate-error.js +++ b/tests/pure/es.aggregate-error.js @@ -18,14 +18,14 @@ QUnit.test('AggregateError', assert => { assert.throws(() => AggregateError([1], Symbol()), 'throws on symbol as a message'); assert.same(toString(AggregateError([1])), '[object Error]', 'Object#toString'); - assert.ok(AggregateError([1], 1) instanceof AggregateError, 'no cause, without new'); - assert.ok(new AggregateError([1], 1) instanceof AggregateError, 'no cause, with new'); + assert.true(AggregateError([1], 1) instanceof AggregateError, 'no cause, without new'); + assert.true(new AggregateError([1], 1) instanceof AggregateError, 'no cause, with new'); - assert.ok(AggregateError([1], 1, {}) instanceof AggregateError, 'with options, without new'); - assert.ok(new AggregateError([1], 1, {}) instanceof AggregateError, 'with options, with new'); + assert.true(AggregateError([1], 1, {}) instanceof AggregateError, 'with options, without new'); + assert.true(new AggregateError([1], 1, {}) instanceof AggregateError, 'with options, with new'); - assert.ok(AggregateError([1], 1, 'foo') instanceof AggregateError, 'non-object options, without new'); - assert.ok(new AggregateError([1], 1, 'foo') instanceof AggregateError, 'non-object options, with new'); + assert.true(AggregateError([1], 1, 'foo') instanceof AggregateError, 'non-object options, without new'); + assert.true(new AggregateError([1], 1, 'foo') instanceof AggregateError, 'non-object options, with new'); assert.same(AggregateError([1], 1, { cause: 7 }).cause, 7, 'cause, without new'); assert.same(new AggregateError([1], 1, { cause: 7 }).cause, 7, 'cause, with new'); @@ -39,12 +39,12 @@ QUnit.test('AggregateError', assert => { assert.same(error.message, '1', 'instance message'); assert.same(error.cause, 7, 'instance cause'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(error.hasOwnProperty('cause'), 'cause is own'); + assert.true(error.hasOwnProperty('cause'), 'cause is own'); error = AggregateError([1]); assert.deepEqual(error.errors, [1]); assert.same(error.message, '', 'default instance message'); assert.same(error.cause, undefined, 'default instance cause undefined'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(!error.hasOwnProperty('cause'), 'default instance cause missed'); + assert.false(error.hasOwnProperty('cause'), 'default instance cause missed'); }); diff --git a/tests/pure/es.error.cause.js b/tests/pure/es.error.cause.js index 08071f436b18..2e6ce6150b62 100644 --- a/tests/pure/es.error.cause.js +++ b/tests/pure/es.error.cause.js @@ -11,17 +11,17 @@ function runErrorTestCase($Error, ERROR_NAME) { if (PROTO && $Error !== path.Error) { // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(path.Error.isPrototypeOf($Error), 'constructor has `Error` in the prototype chain'); + assert.true(path.Error.isPrototypeOf($Error), 'constructor has `Error` in the prototype chain'); } - assert.ok($Error(1) instanceof $Error, 'no cause, without new'); - assert.ok(new $Error(1) instanceof $Error, 'no cause, with new'); + assert.true($Error(1) instanceof $Error, 'no cause, without new'); + assert.true(new $Error(1) instanceof $Error, 'no cause, with new'); - assert.ok($Error(1, {}) instanceof $Error, 'with options, without new'); - assert.ok(new $Error(1, {}) instanceof $Error, 'with options, with new'); + assert.true($Error(1, {}) instanceof $Error, 'with options, without new'); + assert.true(new $Error(1, {}) instanceof $Error, 'with options, with new'); - assert.ok($Error(1, 'foo') instanceof $Error, 'non-object options, without new'); - assert.ok(new $Error(1, 'foo') instanceof $Error, 'non-object options, with new'); + assert.true($Error(1, 'foo') instanceof $Error, 'non-object options, without new'); + assert.true(new $Error(1, 'foo') instanceof $Error, 'non-object options, with new'); assert.same($Error(1, { cause: 7 }).cause, 7, 'cause, without new'); assert.same(new $Error(1, { cause: 7 }).cause, 7, 'cause, with new'); @@ -34,13 +34,13 @@ function runErrorTestCase($Error, ERROR_NAME) { assert.same(error.message, '1', 'instance message'); assert.same(error.cause, 7, 'instance cause'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(error.hasOwnProperty('cause'), 'cause is own'); + assert.true(error.hasOwnProperty('cause'), 'cause is own'); error = $Error(); assert.same(error.message, '', 'default instance message'); assert.same(error.cause, undefined, 'default instance cause undefined'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(!error.hasOwnProperty('cause'), 'default instance cause missed'); + assert.false(error.hasOwnProperty('cause'), 'default instance cause missed'); }); } diff --git a/tests/tests/es.aggregate-error.js b/tests/tests/es.aggregate-error.js index 20125607f29c..450a595db33d 100644 --- a/tests/tests/es.aggregate-error.js +++ b/tests/tests/es.aggregate-error.js @@ -18,16 +18,16 @@ QUnit.test('AggregateError', assert => { assert.same(AggregateError.prototype.constructor, AggregateError, 'prototype constructor'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(!AggregateError.prototype.hasOwnProperty('cause'), 'prototype hasn`t cause'); + assert.false(AggregateError.prototype.hasOwnProperty('cause'), 'prototype hasn`t cause'); - assert.ok(AggregateError([1], 1) instanceof AggregateError, 'no cause, without new'); - assert.ok(new AggregateError([1], 1) instanceof AggregateError, 'no cause, with new'); + assert.true(AggregateError([1], 1) instanceof AggregateError, 'no cause, without new'); + assert.true(new AggregateError([1], 1) instanceof AggregateError, 'no cause, with new'); - assert.ok(AggregateError([1], 1, {}) instanceof AggregateError, 'with options, without new'); - assert.ok(new AggregateError([1], 1, {}) instanceof AggregateError, 'with options, with new'); + assert.true(AggregateError([1], 1, {}) instanceof AggregateError, 'with options, without new'); + assert.true(new AggregateError([1], 1, {}) instanceof AggregateError, 'with options, with new'); - assert.ok(AggregateError([1], 1, 'foo') instanceof AggregateError, 'non-object options, without new'); - assert.ok(new AggregateError([1], 1, 'foo') instanceof AggregateError, 'non-object options, with new'); + assert.true(AggregateError([1], 1, 'foo') instanceof AggregateError, 'non-object options, without new'); + assert.true(new AggregateError([1], 1, 'foo') instanceof AggregateError, 'non-object options, with new'); assert.same(AggregateError([1], 1, { cause: 7 }).cause, 7, 'cause, without new'); assert.same(new AggregateError([1], 1, { cause: 7 }).cause, 7, 'cause, with new'); @@ -41,12 +41,12 @@ QUnit.test('AggregateError', assert => { assert.same(error.message, '1', 'instance message'); assert.same(error.cause, 7, 'instance cause'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(error.hasOwnProperty('cause'), 'cause is own'); + assert.true(error.hasOwnProperty('cause'), 'cause is own'); error = AggregateError([1]); assert.deepEqual(error.errors, [1]); assert.same(error.message, '', 'default instance message'); assert.same(error.cause, undefined, 'default instance cause undefined'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(!error.hasOwnProperty('cause'), 'default instance cause missed'); + assert.false(error.hasOwnProperty('cause'), 'default instance cause missed'); }); diff --git a/tests/tests/es.error.cause.js b/tests/tests/es.error.cause.js index 0d32c2d90206..b89941797db0 100644 --- a/tests/tests/es.error.cause.js +++ b/tests/tests/es.error.cause.js @@ -11,21 +11,21 @@ function runErrorTestCase($Error, ERROR_NAME) { if (PROTO && $Error !== Error) { // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(Error.isPrototypeOf($Error), 'constructor has `Error` in the prototype chain'); + assert.true(Error.isPrototypeOf($Error), 'constructor has `Error` in the prototype chain'); } assert.same($Error.prototype.constructor, $Error, 'prototype constructor'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(!$Error.prototype.hasOwnProperty('cause'), 'prototype hasn`t cause'); + assert.false($Error.prototype.hasOwnProperty('cause'), 'prototype hasn`t cause'); - assert.ok($Error(1) instanceof $Error, 'no cause, without new'); - assert.ok(new $Error(1) instanceof $Error, 'no cause, with new'); + assert.true($Error(1) instanceof $Error, 'no cause, without new'); + assert.true(new $Error(1) instanceof $Error, 'no cause, with new'); - assert.ok($Error(1, {}) instanceof $Error, 'with options, without new'); - assert.ok(new $Error(1, {}) instanceof $Error, 'with options, with new'); + assert.true($Error(1, {}) instanceof $Error, 'with options, without new'); + assert.true(new $Error(1, {}) instanceof $Error, 'with options, with new'); - assert.ok($Error(1, 'foo') instanceof $Error, 'non-object options, without new'); - assert.ok(new $Error(1, 'foo') instanceof $Error, 'non-object options, with new'); + assert.true($Error(1, 'foo') instanceof $Error, 'non-object options, without new'); + assert.true(new $Error(1, 'foo') instanceof $Error, 'non-object options, with new'); assert.same($Error(1, { cause: 7 }).cause, 7, 'cause, without new'); assert.same(new $Error(1, { cause: 7 }).cause, 7, 'cause, with new'); @@ -38,13 +38,13 @@ function runErrorTestCase($Error, ERROR_NAME) { assert.same(error.message, '1', 'instance message'); assert.same(error.cause, 7, 'instance cause'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(error.hasOwnProperty('cause'), 'cause is own'); + assert.true(error.hasOwnProperty('cause'), 'cause is own'); error = $Error(); assert.same(error.message, '', 'default instance message'); assert.same(error.cause, undefined, 'default instance cause undefined'); // eslint-disable-next-line no-prototype-builtins -- safe - assert.ok(!error.hasOwnProperty('cause'), 'default instance cause missed'); + assert.false(error.hasOwnProperty('cause'), 'default instance cause missed'); }); }