Skip to content

Commit 2a24437

Browse files
billiegooseMarc MacLeod
authored and
Marc MacLeod
committed
chore: add another test to parseWithPointers
1 parent 6726f71 commit 2a24437

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

src/__tests__/__snapshots__/parseWithPointers.ts.snap

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ Object {
77
"street": 123,
88
},
99
"hello": "world",
10+
"paths": Object {
11+
"/users/{id}": Object {
12+
"get": Object {
13+
"operationId": "get-user",
14+
},
15+
},
16+
},
1017
},
1118
"pointers": Object {
1219
"": Object {
1320
"end": Object {
14-
"line": 6,
21+
"line": 13,
1522
},
1623
"start": Object {
1724
"line": 1,
@@ -41,6 +48,38 @@ Object {
4148
"line": 2,
4249
},
4350
},
51+
"/paths": Object {
52+
"end": Object {
53+
"line": 12,
54+
},
55+
"start": Object {
56+
"line": 6,
57+
},
58+
},
59+
"/paths/~1users~1{id}": Object {
60+
"end": Object {
61+
"line": 11,
62+
},
63+
"start": Object {
64+
"line": 7,
65+
},
66+
},
67+
"/paths/~1users~1{id}/get": Object {
68+
"end": Object {
69+
"line": 10,
70+
},
71+
"start": Object {
72+
"line": 8,
73+
},
74+
},
75+
"/paths/~1users~1{id}/get/operationId": Object {
76+
"end": Object {
77+
"line": 9,
78+
},
79+
"start": Object {
80+
"line": 9,
81+
},
82+
},
4483
},
4584
"validations": Array [],
4685
}

src/__tests__/parseWithPointers.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ describe('json parser', () => {
77
"hello": "world",
88
"address": {
99
"street": 123
10+
},
11+
"paths": {
12+
"/users/{id}": {
13+
"get": {
14+
"operationId": "get-user"
15+
}
16+
}
1017
}
1118
}`)
1219
).toMatchSnapshot();

0 commit comments

Comments
 (0)