Skip to content

Commit f83e132

Browse files
author
MQuy
committedMar 30, 2022
fix(47923) - Update tests
1 parent 8e410bb commit f83e132

8 files changed

+40
-40
lines changed
 

‎src/testRunner/unittests/publicApi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function test() {}`;
6969
assert.isDefined(tags[0].comment);
7070
assert.isDefined(tags[0].comment![0]);
7171
assert.isString(tags[0].comment);
72-
assert.equal(tags[0].comment as string, "Some\n text\r\n with newlines.");
72+
assert.equal(tags[0].comment as string, "Some\ntext\r\nwith newlines.");
7373
});
7474
});
7575

‎tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.@link tags.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"comment": {
8787
"0": {
8888
"kind": "JSDocText",
89-
"pos": 70,
89+
"pos": 69,
9090
"end": 79,
9191
"modifierFlagsCache": 0,
9292
"transformFlags": 0,
@@ -124,7 +124,7 @@
124124
"text": ""
125125
},
126126
"length": 2,
127-
"pos": 70,
127+
"pos": 69,
128128
"end": 102,
129129
"hasTrailingComma": false,
130130
"transformFlags": 0
@@ -157,7 +157,7 @@
157157
"comment": {
158158
"0": {
159159
"kind": "JSDocText",
160-
"pos": 113,
160+
"pos": 112,
161161
"end": 120,
162162
"modifierFlagsCache": 0,
163163
"transformFlags": 0,
@@ -185,7 +185,7 @@
185185
"end": 156,
186186
"modifierFlagsCache": 0,
187187
"transformFlags": 0,
188-
"text": "\n"
188+
"text": ""
189189
},
190190
"3": {
191191
"kind": "JSDocLink",
@@ -346,7 +346,7 @@
346346
"text": " * }, because of the intermediate asterisks."
347347
},
348348
"length": 15,
349-
"pos": 113,
349+
"pos": 112,
350350
"end": 589,
351351
"hasTrailingComma": false,
352352
"transformFlags": 0

‎tests/baselines/reference/completionsCommentsCommentParsing.baseline

+7-7
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@
778778
"kind": "space"
779779
},
780780
{
781-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
781+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
782782
"kind": "text"
783783
}
784784
]
@@ -6254,7 +6254,7 @@
62546254
"kind": "space"
62556255
},
62566256
{
6257-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
6257+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
62586258
"kind": "text"
62596259
}
62606260
]
@@ -12779,7 +12779,7 @@
1277912779
"kind": "space"
1278012780
},
1278112781
{
12782-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
12782+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
1278312783
"kind": "text"
1278412784
}
1278512785
]
@@ -18316,7 +18316,7 @@
1831618316
"kind": "space"
1831718317
},
1831818318
{
18319-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
18319+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
1832018320
"kind": "text"
1832118321
}
1832218322
]
@@ -24286,7 +24286,7 @@
2428624286
"kind": "space"
2428724287
},
2428824288
{
24289-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
24289+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
2429024290
"kind": "text"
2429124291
}
2429224292
]
@@ -29762,7 +29762,7 @@
2976229762
"kind": "space"
2976329763
},
2976429764
{
29765-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
29765+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
2976629766
"kind": "text"
2976729767
}
2976829768
]
@@ -36201,7 +36201,7 @@
3620136201
"kind": "space"
3620236202
},
3620336203
{
36204-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
36204+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
3620536205
"kind": "text"
3620636206
}
3620736207
]

‎tests/baselines/reference/quickInfoCommentsCommentParsing.baseline

+3-3
Original file line numberDiff line numberDiff line change
@@ -4228,7 +4228,7 @@
42284228
],
42294229
"documentation": [
42304230
{
4231-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
4231+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
42324232
"kind": "text"
42334233
}
42344234
],
@@ -4245,7 +4245,7 @@
42454245
"kind": "space"
42464246
},
42474247
{
4248-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
4248+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
42494249
"kind": "text"
42504250
}
42514251
]
@@ -4474,7 +4474,7 @@
44744474
"kind": "space"
44754475
},
44764476
{
4477-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
4477+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
44784478
"kind": "text"
44794479
}
44804480
]

‎tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"name": "example",
5353
"text": [
5454
{
55-
"text": "if (true) {\n foo()\n}",
55+
"text": "if (true) {\n foo()\n}",
5656
"kind": "text"
5757
}
5858
]
@@ -113,7 +113,7 @@
113113
"name": "example",
114114
"text": [
115115
{
116-
"text": "{\n foo()\n}",
116+
"text": "{\nfoo()\n}",
117117
"kind": "text"
118118
}
119119
]
@@ -174,7 +174,7 @@
174174
"name": "example",
175175
"text": [
176176
{
177-
"text": " x y\n 12345\n b",
177+
"text": " x y\n12345\n b",
178178
"kind": "text"
179179
}
180180
]
@@ -238,7 +238,7 @@
238238
"name": "example",
239239
"text": [
240240
{
241-
"text": " x y\n 12345\n b",
241+
"text": " x y\n12345\n b",
242242
"kind": "text"
243243
}
244244
]
@@ -302,7 +302,7 @@
302302
"name": "example",
303303
"text": [
304304
{
305-
"text": "x y\n12345\n b",
305+
"text": "x y\n12345\n b",
306306
"kind": "text"
307307
}
308308
]

‎tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline

+8-8
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"name": "var1",
5353
"documentation": [
5454
{
55-
"text": "**Highlighted text**",
55+
"text": "*Highlighted text**",
5656
"kind": "text"
5757
}
5858
],
@@ -121,7 +121,7 @@
121121
"kind": "space"
122122
},
123123
{
124-
"text": "**Highlighted text**",
124+
"text": "*Highlighted text**",
125125
"kind": "text"
126126
}
127127
]
@@ -208,7 +208,7 @@
208208
"name": "var1",
209209
"documentation": [
210210
{
211-
"text": "*Regular text with an asterisk",
211+
"text": "Regular text with an asterisk",
212212
"kind": "text"
213213
}
214214
],
@@ -277,7 +277,7 @@
277277
"kind": "space"
278278
},
279279
{
280-
"text": "*Regular text with an asterisk",
280+
"text": "Regular text with an asterisk",
281281
"kind": "text"
282282
}
283283
]
@@ -676,7 +676,7 @@
676676
"name": "var1",
677677
"documentation": [
678678
{
679-
"text": "**Highlighted text**",
679+
"text": "*Highlighted text**",
680680
"kind": "text"
681681
}
682682
],
@@ -705,7 +705,7 @@
705705
"name": "var2",
706706
"documentation": [
707707
{
708-
"text": "Another **Highlighted text**",
708+
"text": "\nAnother **Highlighted text**",
709709
"kind": "text"
710710
}
711711
],
@@ -745,7 +745,7 @@
745745
"kind": "space"
746746
},
747747
{
748-
"text": "**Highlighted text**",
748+
"text": "*Highlighted text**",
749749
"kind": "text"
750750
}
751751
]
@@ -762,7 +762,7 @@
762762
"kind": "space"
763763
},
764764
{
765-
"text": "Another **Highlighted text**",
765+
"text": "\nAnother **Highlighted text**",
766766
"kind": "text"
767767
}
768768
]

‎tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline

+6-6
Original file line numberDiff line numberDiff line change
@@ -7471,7 +7471,7 @@
74717471
"name": "b",
74727472
"documentation": [
74737473
{
7474-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
7474+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
74757475
"kind": "text"
74767476
}
74777477
],
@@ -7562,7 +7562,7 @@
75627562
"kind": "space"
75637563
},
75647564
{
7565-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
7565+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
75667566
"kind": "text"
75677567
}
75687568
]
@@ -7678,7 +7678,7 @@
76787678
"name": "b",
76797679
"documentation": [
76807680
{
7681-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
7681+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
76827682
"kind": "text"
76837683
}
76847684
],
@@ -7769,7 +7769,7 @@
77697769
"kind": "space"
77707770
},
77717771
{
7772-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
7772+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
77737773
"kind": "text"
77747774
}
77757775
]
@@ -7885,7 +7885,7 @@
78857885
"name": "b",
78867886
"documentation": [
78877887
{
7888-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
7888+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
78897889
"kind": "text"
78907890
}
78917891
],
@@ -7976,7 +7976,7 @@
79767976
"kind": "space"
79777977
},
79787978
{
7979-
"text": "this is info about b\nspanning on two lines and aligned perfectly\nspanning one more line alined perfectly\n spanning another line with more margin",
7979+
"text": "this is info about b\n spanning on two lines and aligned perfectly\n spanning one more line alined perfectly\n spanning another line with more margin",
79807980
"kind": "text"
79817981
}
79827982
]

‎tests/cases/fourslash/commentsLinePreservation.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -129,22 +129,22 @@ verify.quickInfos({
129129
3: ["(parameter) param1: string", "first line of param\n\nparam information third line"],
130130

131131
g: ["function g(param1: string): void", "This is firstLine\nThis is second Line"],
132-
4: ["(parameter) param1: string", " param information first line"],
132+
4: ["(parameter) param1: string", "\n\nparam information first line"],
133133

134134
h: ["function h(param1: string): void", "This is firstLine\nThis is second Line"],
135-
5: ["(parameter) param1: string", " param information first line\n\n param information third line"],
135+
5: ["(parameter) param1: string", "\n\nparam information first line\n\nparam information third line"],
136136

137137
i: ["function i(param1: string): void", "This is firstLine\nThis is second Line"],
138-
6: ["(parameter) param1: string", " param information first line\n\n param information third line"],
138+
6: ["(parameter) param1: string", "\n\nparam information first line\n\nparam information third line"],
139139

140140
j: ["function j(param1: string): void", "This is firstLine\nThis is second Line"],
141-
7: ["(parameter) param1: string", " param information first line\n\n param information third line"],
141+
7: ["(parameter) param1: string", "\n\nparam information first line\n\nparam information third line"],
142142

143143
k: ["function k(param1: string): void", "This is firstLine\nThis is second Line"],
144144
8: ["(parameter) param1: string", "hello"],
145145

146146
l: ["function l(param1: string): void", "This is firstLine\nThis is second Line"],
147-
9: ["(parameter) param1: string", "first Line text\nblank line that shouldnt be shown when starting this \nsecond time information about the param again"],
147+
9: ["(parameter) param1: string", "first Line text\n\n\nblank line that shouldnt be shown when starting this \nsecond time information about the param again"],
148148

149149
m: ["function m(param1: string): void", "This is firstLine\nThis is second Line\n[1]: third * line"],
150150
10: ["(parameter) param1: string", "first Line text\nsecond line text"]

0 commit comments

Comments
 (0)
Failed to load comments.