Skip to content

Commit 8020072

Browse files
authored
Respect @BaselineFile in fourslash tests and tidy up quickInfoDisplayPartsVarShims (#48506)
1 parent acb927e commit 8020072

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

src/harness/fourslashImpl.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,8 @@ namespace FourSlash {
21202120
}
21212121

21222122
private getBaselineFileNameForContainingTestFile(ext = ".baseline") {
2123-
return ts.getBaseFileName(this.originalInputFileName).replace(ts.Extension.Ts, ext);
2123+
return this.testData.globalOptions[MetadataOptionNames.baselineFile] ||
2124+
ts.getBaseFileName(this.originalInputFileName).replace(ts.Extension.Ts, ext);
21242125
}
21252126

21262127
private getSignatureHelp({ triggerReason }: FourSlashInterface.VerifySignatureHelpOptions): ts.SignatureHelpItems | undefined {

tests/baselines/reference/quickInfoDisplayPartsVarShimspp.baseline renamed to tests/baselines/reference/quickInfoDisplayPartsVar.shims-pp.baseline

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"marker": {
4-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
4+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
55
"position": 4,
66
"name": "1"
77
},
@@ -43,7 +43,7 @@
4343
},
4444
{
4545
"marker": {
46-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
46+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
4747
"position": 37,
4848
"name": "2"
4949
},
@@ -93,7 +93,7 @@
9393
},
9494
{
9595
"marker": {
96-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
96+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
9797
"position": 41,
9898
"name": "3"
9999
},
@@ -135,7 +135,7 @@
135135
},
136136
{
137137
"marker": {
138-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
138+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
139139
"position": 65,
140140
"name": "4"
141141
},
@@ -177,7 +177,7 @@
177177
},
178178
{
179179
"marker": {
180-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
180+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
181181
"position": 88,
182182
"name": "5"
183183
},
@@ -227,7 +227,7 @@
227227
},
228228
{
229229
"marker": {
230-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
230+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
231231
"position": 102,
232232
"name": "6"
233233
},
@@ -289,7 +289,7 @@
289289
},
290290
{
291291
"marker": {
292-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
292+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
293293
"position": 123,
294294
"name": "7"
295295
},
@@ -351,7 +351,7 @@
351351
},
352352
{
353353
"marker": {
354-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
354+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
355355
"position": 127,
356356
"name": "8"
357357
},
@@ -413,7 +413,7 @@
413413
},
414414
{
415415
"marker": {
416-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
416+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
417417
"position": 130,
418418
"name": "9"
419419
},
@@ -475,7 +475,7 @@
475475
},
476476
{
477477
"marker": {
478-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
478+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
479479
"position": 139,
480480
"name": "10"
481481
},
@@ -621,7 +621,7 @@
621621
},
622622
{
623623
"marker": {
624-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
624+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
625625
"position": 193,
626626
"name": "11"
627627
},
@@ -767,7 +767,7 @@
767767
},
768768
{
769769
"marker": {
770-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
770+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
771771
"position": 197,
772772
"name": "12"
773773
},
@@ -913,7 +913,7 @@
913913
},
914914
{
915915
"marker": {
916-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
916+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
917917
"position": 200,
918918
"name": "13"
919919
},
@@ -1019,7 +1019,7 @@
10191019
},
10201020
{
10211021
"marker": {
1022-
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShimspp.ts",
1022+
"fileName": "/tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts",
10231023
"position": 207,
10241024
"name": "14"
10251025
},

0 commit comments

Comments
 (0)