Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 8cbd3a6

Browse files
committed
Remove redundant tests
1 parent 1efadb4 commit 8cbd3a6

File tree

2 files changed

+2
-58
lines changed

2 files changed

+2
-58
lines changed

__tests__/json-stringify.test.ts

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,6 @@ describe('Calling JSON.parse() on a stringifed object with all possible values r
180180
});
181181

182182
describe('Stringifying an object with one string value returns the same result as JSON.stringify() when the string includes', () => {
183-
test('an ASCII control character', () => {
184-
const obj = { a: 'abc' + String.fromCharCode(31) };
185-
186-
const expectedResult = JSON.stringify(obj);
187-
const result = jsonStringify(obj, false);
188-
189-
expect(result).toEqual(expectedResult);
190-
});
191-
192183
test('a double quote (")', () => {
193184
const obj = { a: '"abc"' };
194185

@@ -207,33 +198,14 @@ describe('Stringifying an object with one string value returns the same result a
207198
expect(result).toEqual(expectedResult);
208199
});
209200

210-
test('a UTF-16 surrogate pair (0xD83D 0xDE00 😀)', () => {
201+
test('an emoji', () => {
211202
const obj = { a: '😀' };
212203

213204
const expectedResult = JSON.stringify(obj);
214205
const result = jsonStringify(obj, false);
215206

216207
expect(result).toEqual(expectedResult);
217208
});
218-
219-
test('a lone leading surrogate (0xD83D)', () => {
220-
const obj = { a: '\uD83D' };
221-
222-
223-
const expectedResult = JSON.stringify(obj);
224-
const result = jsonStringify(obj, false);
225-
226-
expect(result).toEqual(expectedResult);
227-
});
228-
229-
test('a lone trailing surrogate (0xDE00)', () => {
230-
const obj = { a: '\uDE00' };
231-
232-
const expectedResult = JSON.stringify(obj);
233-
const result = jsonStringify(obj, false);
234-
235-
expect(result).toEqual(expectedResult);
236-
});
237209
});
238210

239211
describe('Stringifying an object with a BigInt throws an error', () => {

__tests__/stable-json-stringify.test.ts

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,6 @@ describe('Calling JSON.parse() on a stringifed object with all possible values r
180180
});
181181

182182
describe('Stringifying an object with one string value returns the same result as JSON.stringify() when the string includes', () => {
183-
test('an ASCII control character', () => {
184-
const obj = { a: 'abc' + String.fromCharCode(31) };
185-
186-
const expectedResult = JSON.stringify(obj);
187-
const result = stableJsonStringify(obj);
188-
189-
expect(result).toEqual(expectedResult);
190-
});
191-
192183
test('a double quote (")', () => {
193184
const obj = { a: '"abc"' };
194185

@@ -207,33 +198,14 @@ describe('Stringifying an object with one string value returns the same result a
207198
expect(result).toEqual(expectedResult);
208199
});
209200

210-
test('a UTF-16 surrogate pair (0xD83D 0xDE00 😀)', () => {
201+
test('an emoji', () => {
211202
const obj = { a: '😀' };
212203

213204
const expectedResult = JSON.stringify(obj);
214205
const result = stableJsonStringify(obj);
215206

216207
expect(result).toEqual(expectedResult);
217208
});
218-
219-
test('a lone leading surrogate (0xD83D)', () => {
220-
const obj = { a: '\uD83D' };
221-
222-
223-
const expectedResult = JSON.stringify(obj);
224-
const result = stableJsonStringify(obj);
225-
226-
expect(result).toEqual(expectedResult);
227-
});
228-
229-
test('a lone trailing surrogate (0xDE00)', () => {
230-
const obj = { a: '\uDE00' };
231-
232-
const expectedResult = JSON.stringify(obj);
233-
const result = stableJsonStringify(obj);
234-
235-
expect(result).toEqual(expectedResult);
236-
});
237209
});
238210

239211
describe('Stringifying an object with a BigInt throws an error', () => {

0 commit comments

Comments
 (0)