Skip to content

Commit

Permalink
Fix tests rejects -> throws
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Oct 17, 2024
1 parent 835a9ba commit 00233e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/stringify-chunked.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('stringifyChunked()', () => {
const circularRef = {};
circularRef.a = circularRef;

assert.rejects(
assert.throws(
createStringifyTestFn(circularRef, ''),
(err) => {
assert.strictEqual(err.message, 'Converting circular structure to JSON');
Expand All @@ -196,7 +196,7 @@ describe('stringifyChunked()', () => {
const circularRef = [];
circularRef.push({ a: circularRef });

assert.rejects(
assert.throws(
createStringifyTestFn(circularRef, ''),
(err) => {
assert.strictEqual(err.message, 'Converting circular structure to JSON');
Expand All @@ -209,7 +209,7 @@ describe('stringifyChunked()', () => {
const circularRef = {};
circularRef.a = [circularRef];

assert.rejects(
assert.throws(
createStringifyTestFn(circularRef, ''),
(err) => {
assert.strictEqual(err.message, 'Converting circular structure to JSON');
Expand All @@ -222,7 +222,7 @@ describe('stringifyChunked()', () => {
const circularRef = [];
circularRef.push(circularRef);

assert.rejects(
assert.throws(
createStringifyTestFn(circularRef, ''),
(err) => {
assert.strictEqual(err.message, 'Converting circular structure to JSON');
Expand Down

0 comments on commit 00233e2

Please sign in to comment.