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

Commit 729ae64

Browse files
committed
✅ add test case
1 parent 94f6abf commit 729ae64

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
const test1 = { foo: { bar: 1337 } }
22
const test2 = { 1: "123", 23: 45, b: "b_val" }
3-
const res = [test1, test2]
3+
const test3 = {}
4+
const res = [test1, test2, test3]
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
const test1 = JSON.parse('{"foo":{"bar":1337}}')
22
const test2 = JSON.parse('{"1":"123","23":45,"b":"b_val"}')
3-
const res = [test1, test2]
3+
const test3 = JSON.parse('{}')
4+
const res = [test1, test2, test3]

test/__fixtures__/object/string/input.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ const test1 = { foo: 'foo' }
22
const test2 = { foo: "foo" }
33
const test3 = { foo: "fo'o" }
44
const test4 = { foo: 'fo"o' }
5-
const res = [test1, test2, test3, test4]
5+
const test5 = { foo: '' }
6+
const test6 = { foo: "" }
7+
const res = [test1, test2, test3, test4, test5, test6]

test/__fixtures__/object/string/output.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ const test1 = JSON.parse('{"foo":"foo"}')
22
const test2 = JSON.parse('{"foo":"foo"}')
33
const test3 = JSON.parse('{"foo":"fo\'o"}')
44
const test4 = JSON.parse('{"foo":"fo\\"o"}')
5-
const res = [test1, test2, test3, test4]
5+
const test5 = JSON.parse('{"foo":""}')
6+
const test6 = JSON.parse('{"foo":""}')
7+
const res = [test1, test2, test3, test4, test5, test6]

0 commit comments

Comments
 (0)