Skip to content

Commit dd8df7a

Browse files
committed
Same for this test
1 parent ec8e039 commit dd8df7a

2 files changed

Lines changed: 79 additions & 9 deletions

File tree

src/testRunner/unittests/tscWatch/resolutionCache.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,10 @@ declare module "fs" {
382382
edits: [
383383
{
384384
caption: "npm install",
385-
edit: sys => sys.renameFolder(`/user/username/projects/myproject/node_modules2`, `/user/username/projects/myproject/node_modules`),
385+
edit: sys => {
386+
sys.renameFolder(`/user/username/projects/myproject/node_modules2`, `/user/username/projects/myproject/node_modules`);
387+
sys.runQueuedTimeoutCallbacks();
388+
},
386389
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
387390
},
388391
],

tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js

Lines changed: 75 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,17 @@ exitCode:: ExitStatus.undefined
8080

8181
Change:: npm install
8282

83-
Input::
83+
Before running Timeout callback:: count: 1
84+
4: timerToInvalidateFailedLookupResolutions
85+
Output::
86+
sysLog:: /user/username/projects/myproject/node_modules:: Changing watcher to PresentFileSystemEntryWatcher
87+
88+
8489
//// [/user/username/projects/myproject/node_modules/@types/qqq/index.d.ts]
8590
export {}
8691

8792
//// [/user/username/projects/myproject/node_modules2/@types/qqq/index.d.ts] deleted
8893

89-
Output::
90-
sysLog:: /user/username/projects/myproject/node_modules:: Changing watcher to PresentFileSystemEntryWatcher
91-
92-
9394
PolledWatches::
9495
/user/username/projects/node_modules:
9596
{"pollingInterval":500}
@@ -115,14 +116,80 @@ FsWatchesRecursive::
115116
Timeout callback:: count: 1
116117
4: timerToInvalidateFailedLookupResolutions *new*
117118

118-
Before running Timeout callback:: count: 1
119-
4: timerToInvalidateFailedLookupResolutions
120-
121119
Host is moving to new time
122120
After running Timeout callback:: count: 1
123121

124122
Timeout callback:: count: 1
125123
5: timerToUpdateProgram *new*
126124

125+
Input::
126+
127+
Before running Timeout callback:: count: 1
128+
5: timerToUpdateProgram
129+
130+
Host is moving to new time
131+
After running Timeout callback:: count: 0
132+
Output::
133+
>> Screen clear
134+
[HH:MM:SS AM] File change detected. Starting incremental compilation...
135+
136+
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
137+
138+
139+
140+
//// [/user/username/projects/myproject/a.js] file written with same contents
141+
142+
PolledWatches::
143+
/user/username/projects/myproject/node_modules/@types/package.json: *new*
144+
{"pollingInterval":2000}
145+
/user/username/projects/myproject/node_modules/@types/qqq/package.json: *new*
146+
{"pollingInterval":2000}
147+
/user/username/projects/myproject/node_modules/package.json: *new*
148+
{"pollingInterval":2000}
149+
/user/username/projects/myproject/package.json: *new*
150+
{"pollingInterval":2000}
151+
/user/username/projects/package.json: *new*
152+
{"pollingInterval":2000}
153+
154+
PolledWatches *deleted*::
155+
/user/username/projects/node_modules:
156+
{"pollingInterval":500}
157+
158+
FsWatches::
159+
/home/src/tslibs/TS/Lib/lib.d.ts:
160+
{}
161+
/user/username/projects:
162+
{}
163+
/user/username/projects/myproject:
164+
{}
165+
/user/username/projects/myproject/a.ts:
166+
{}
167+
/user/username/projects/myproject/node_modules/@types/qqq/index.d.ts: *new*
168+
{}
169+
170+
FsWatchesRecursive::
171+
/user/username/projects/myproject/node_modules:
172+
{}
173+
174+
175+
Program root files: [
176+
"/user/username/projects/myproject/a.ts"
177+
]
178+
Program options: {
179+
"watch": true
180+
}
181+
Program structureReused: SafeModules
182+
Program files::
183+
/home/src/tslibs/TS/Lib/lib.d.ts
184+
/user/username/projects/myproject/node_modules/@types/qqq/index.d.ts
185+
/user/username/projects/myproject/a.ts
186+
187+
Semantic diagnostics in builder refreshed for::
188+
/user/username/projects/myproject/node_modules/@types/qqq/index.d.ts
189+
/user/username/projects/myproject/a.ts
190+
191+
Shape signatures in builder refreshed for::
192+
/user/username/projects/myproject/node_modules/@types/qqq/index.d.ts (used version)
193+
/user/username/projects/myproject/a.ts (computed .d.ts)
127194

128195
exitCode:: ExitStatus.undefined

0 commit comments

Comments
 (0)