Skip to content

Commit 8fb2ff4

Browse files
committed
Modify test configuration
1 parent 0c151dc commit 8fb2ff4

5 files changed

Lines changed: 65 additions & 47 deletions

File tree

tests/baselines/reference/referencesForSpecializeTag.baseline.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// === findAllReferences ===
2-
// === /tests/cases/fourslash/server/referencesForSpecializeTag.js ===
2+
// === /tests/cases/fourslash/server/a.js ===
33
// --- (line: 3) skipped ---
44
// class Collection {}
55
//
@@ -13,7 +13,7 @@
1313
// const users = new Collection('users');
1414

1515
// === Definitions ===
16-
// === /tests/cases/fourslash/server/referencesForSpecializeTag.js ===
16+
// === /tests/cases/fourslash/server/a.js ===
1717
// --- (line: 3) skipped ---
1818
// class Collection {}
1919
//

tests/baselines/reference/tsserver/fourslashServer/quickInfoJSDocSpecializeTagInJsx.js

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
currentDirectory:: / useCaseSensitiveFileNames: false
22
Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist
3-
//// [/a.jsx]
3+
//// [/lib.d.ts]
4+
lib.d.ts-Text
5+
6+
//// [/lib.decorators.d.ts]
7+
lib.decorators.d.ts-Text
8+
9+
//// [/lib.decorators.legacy.d.ts]
10+
lib.decorators.legacy.d.ts-Text
11+
12+
//// [/tests/cases/fourslash/server/a.jsx]
413
/**
514
* @template T
615
* @param {object} props
@@ -17,45 +26,46 @@ const el1 = <Input />;
1726
// Here, the type argument will be inferred
1827
const el2 = <Input value="abc" />;
1928

20-
//// [/lib.d.ts]
21-
lib.d.ts-Text
22-
23-
//// [/lib.decorators.d.ts]
24-
lib.decorators.d.ts-Text
25-
26-
//// [/lib.decorators.legacy.d.ts]
27-
lib.decorators.legacy.d.ts-Text
28-
2929

3030
Info seq [hh:mm:ss:mss] request:
3131
{
3232
"seq": 0,
3333
"type": "request",
3434
"arguments": {
35-
"file": "/a.jsx"
35+
"file": "/tests/cases/fourslash/server/a.jsx"
3636
},
3737
"command": "open"
3838
}
39-
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a.jsx ProjectRootPath: undefined:: Result: undefined
39+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/a.jsx ProjectRootPath: undefined:: Result: undefined
40+
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
41+
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
4042
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
4143
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info
44+
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
45+
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
46+
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
47+
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
4248
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info
4349
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info
50+
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
51+
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
52+
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
53+
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
4454
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms
4555
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
4656
Info seq [hh:mm:ss:mss] Files (4)
4757
/lib.d.ts Text-1 lib.d.ts-Text
4858
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
4959
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
50-
/a.jsx SVC-1-0 "/**\n * @template T\n * @param {object} props\n * @param {T | undefined} props.value\n * @returns {null}\n */\nfunction Input(props) {\n return null;\n}\n\n/** @specialize {number} */\nconst el1 = <Input />;\n\n// Here, the type argument will be inferred\nconst el2 = <Input value=\"abc\" />;"
60+
/tests/cases/fourslash/server/a.jsx SVC-1-0 "/**\n * @template T\n * @param {object} props\n * @param {T | undefined} props.value\n * @returns {null}\n */\nfunction Input(props) {\n return null;\n}\n\n/** @specialize {number} */\nconst el1 = <Input />;\n\n// Here, the type argument will be inferred\nconst el2 = <Input value=\"abc\" />;"
5161

5262

53-
lib.d.ts
63+
../../../../lib.d.ts
5464
Default library for target 'es5'
55-
lib.decorators.d.ts
56-
Library referenced via 'decorators' from file 'lib.d.ts'
57-
lib.decorators.legacy.d.ts
58-
Library referenced via 'decorators.legacy' from file 'lib.d.ts'
65+
../../../../lib.decorators.d.ts
66+
Library referenced via 'decorators' from file '../../../../lib.d.ts'
67+
../../../../lib.decorators.legacy.d.ts
68+
Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts'
5969
a.jsx
6070
Root file specified for compilation
6171

@@ -65,7 +75,7 @@ Info seq [hh:mm:ss:mss] Files (4)
6575

6676
Info seq [hh:mm:ss:mss] -----------------------------------------------
6777
Info seq [hh:mm:ss:mss] Open files:
68-
Info seq [hh:mm:ss:mss] FileName: /a.jsx ProjectRootPath: undefined
78+
Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.jsx ProjectRootPath: undefined
6979
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1*
7080
Info seq [hh:mm:ss:mss] response:
7181
{
@@ -86,17 +96,27 @@ watchedFiles::
8696
{"pollingInterval":500}
8797
/lib.decorators.legacy.d.ts: *new*
8898
{"pollingInterval":500}
99+
/tests/cases/fourslash/server/jsconfig.json: *new*
100+
{"pollingInterval":2000}
101+
/tests/cases/fourslash/server/tsconfig.json: *new*
102+
{"pollingInterval":2000}
103+
104+
watchedDirectoriesRecursive::
105+
/tests/cases/fourslash/node_modules: *new*
106+
{}
107+
/tests/cases/fourslash/node_modules/@types: *new*
108+
{}
109+
/tests/cases/fourslash/server/node_modules: *new*
110+
{}
111+
/tests/cases/fourslash/server/node_modules/@types: *new*
112+
{}
89113

90114
Projects::
91115
/dev/null/inferredProject1* (Inferred) *new*
92116
projectStateVersion: 1
93117
projectProgramVersion: 1
94118

95119
ScriptInfos::
96-
/a.jsx (Open) *new*
97-
version: SVC-1-0
98-
containingProjects: 1
99-
/dev/null/inferredProject1* *default*
100120
/lib.d.ts *new*
101121
version: Text-1
102122
containingProjects: 1
@@ -109,13 +129,17 @@ ScriptInfos::
109129
version: Text-1
110130
containingProjects: 1
111131
/dev/null/inferredProject1*
132+
/tests/cases/fourslash/server/a.jsx (Open) *new*
133+
version: SVC-1-0
134+
containingProjects: 1
135+
/dev/null/inferredProject1* *default*
112136

113137
Info seq [hh:mm:ss:mss] request:
114138
{
115139
"seq": 1,
116140
"type": "request",
117141
"arguments": {
118-
"file": "/a.jsx",
142+
"file": "/tests/cases/fourslash/server/a.jsx",
119143
"line": 12,
120144
"offset": 14
121145
},
@@ -165,7 +189,7 @@ Info seq [hh:mm:ss:mss] request:
165189
"seq": 2,
166190
"type": "request",
167191
"arguments": {
168-
"file": "/a.jsx",
192+
"file": "/tests/cases/fourslash/server/a.jsx",
169193
"line": 15,
170194
"offset": 14
171195
},

tests/baselines/reference/tsserver/fourslashServer/referencesForSpecializeTag.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ lib.decorators.d.ts-Text
99
//// [/lib.decorators.legacy.d.ts]
1010
lib.decorators.legacy.d.ts-Text
1111

12-
//// [/tests/cases/fourslash/server/referencesForSpecializeTag.js]
12+
//// [/tests/cases/fourslash/server/a.js]
1313
/**
1414
* @template T
1515
*/
@@ -30,11 +30,11 @@ Info seq [hh:mm:ss:mss] request:
3030
"seq": 0,
3131
"type": "request",
3232
"arguments": {
33-
"file": "/tests/cases/fourslash/server/referencesForSpecializeTag.js"
33+
"file": "/tests/cases/fourslash/server/a.js"
3434
},
3535
"command": "open"
3636
}
37-
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/referencesForSpecializeTag.js ProjectRootPath: undefined:: Result: undefined
37+
Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/a.js ProjectRootPath: undefined:: Result: undefined
3838
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
3939
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
4040
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
@@ -55,7 +55,7 @@ Info seq [hh:mm:ss:mss] Files (4)
5555
/lib.d.ts Text-1 lib.d.ts-Text
5656
/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
5757
/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
58-
/tests/cases/fourslash/server/referencesForSpecializeTag.js SVC-1-0 "/**\n * @template T\n */\nclass Collection {}\n\n/**\n * @typedef {object} UserData\n * @property {string} id\n * @property {string} name\n */\n\n/** @specialize <UserData> */\nconst users = new Collection('users');"
58+
/tests/cases/fourslash/server/a.js SVC-1-0 "/**\n * @template T\n */\nclass Collection {}\n\n/**\n * @typedef {object} UserData\n * @property {string} id\n * @property {string} name\n */\n\n/** @specialize <UserData> */\nconst users = new Collection('users');"
5959

6060

6161
../../../../lib.d.ts
@@ -64,7 +64,7 @@ Info seq [hh:mm:ss:mss] Files (4)
6464
Library referenced via 'decorators' from file '../../../../lib.d.ts'
6565
../../../../lib.decorators.legacy.d.ts
6666
Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts'
67-
referencesForSpecializeTag.js
67+
a.js
6868
Root file specified for compilation
6969

7070
Info seq [hh:mm:ss:mss] -----------------------------------------------
@@ -73,7 +73,7 @@ Info seq [hh:mm:ss:mss] Files (4)
7373

7474
Info seq [hh:mm:ss:mss] -----------------------------------------------
7575
Info seq [hh:mm:ss:mss] Open files:
76-
Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/referencesForSpecializeTag.js ProjectRootPath: undefined
76+
Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.js ProjectRootPath: undefined
7777
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1*
7878
Info seq [hh:mm:ss:mss] response:
7979
{
@@ -127,7 +127,7 @@ ScriptInfos::
127127
version: Text-1
128128
containingProjects: 1
129129
/dev/null/inferredProject1*
130-
/tests/cases/fourslash/server/referencesForSpecializeTag.js (Open) *new*
130+
/tests/cases/fourslash/server/a.js (Open) *new*
131131
version: SVC-1-0
132132
containingProjects: 1
133133
/dev/null/inferredProject1* *default*
@@ -137,13 +137,13 @@ Info seq [hh:mm:ss:mss] request:
137137
"seq": 1,
138138
"type": "request",
139139
"arguments": {
140-
"file": "/tests/cases/fourslash/server/referencesForSpecializeTag.js",
140+
"file": "/tests/cases/fourslash/server/a.js",
141141
"line": 7,
142142
"offset": 23
143143
},
144144
"command": "references-full"
145145
}
146-
Info seq [hh:mm:ss:mss] Finding references to /tests/cases/fourslash/server/referencesForSpecializeTag.js position 70 in project /dev/null/inferredProject1*
146+
Info seq [hh:mm:ss:mss] Finding references to /tests/cases/fourslash/server/a.js position 70 in project /dev/null/inferredProject1*
147147
Info seq [hh:mm:ss:mss] response:
148148
{
149149
"seq": 0,
@@ -156,7 +156,7 @@ Info seq [hh:mm:ss:mss] response:
156156
"definition": {
157157
"containerKind": "",
158158
"containerName": "",
159-
"fileName": "/tests/cases/fourslash/server/referencesForSpecializeTag.js",
159+
"fileName": "/tests/cases/fourslash/server/a.js",
160160
"kind": "type",
161161
"name": "type UserData = {\n id: string;\n name: string;\n}",
162162
"textSpan": {
@@ -268,7 +268,7 @@ Info seq [hh:mm:ss:mss] response:
268268
"start": 69,
269269
"length": 8
270270
},
271-
"fileName": "/tests/cases/fourslash/server/referencesForSpecializeTag.js",
271+
"fileName": "/tests/cases/fourslash/server/a.js",
272272
"contextSpan": {
273273
"start": 51,
274274
"length": 80
@@ -281,7 +281,7 @@ Info seq [hh:mm:ss:mss] response:
281281
"start": 152,
282282
"length": 8
283283
},
284-
"fileName": "/tests/cases/fourslash/server/referencesForSpecializeTag.js",
284+
"fileName": "/tests/cases/fourslash/server/a.js",
285285
"isWriteAccess": false,
286286
"isDefinition": false
287287
}

tests/cases/fourslash/server/quickInfoJSDocSpecializeTagInJsx.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
/// <reference path="../fourslash.ts"/>
22

3-
// @allowJs: true
4-
// @checkJs: true
5-
63
// @jsx: preserve
4+
// @filename: a.jsx
75

8-
// @filename: /a.jsx
96
//// /**
107
//// * @template T
118
//// * @param {object} props

tests/cases/fourslash/server/referencesForSpecializeTag.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/// <reference path='fourslash.ts'/>
22

3-
// @allowJs: true
4-
// @checkJs: true
5-
6-
// @filename: referencesForSpecializeTag.js
3+
// @filename: a.js
74

85
//// /**
96
//// * @template T

0 commit comments

Comments
 (0)