Skip to content

Commit ec8e039

Browse files
committed
Add timeout run so we can see zero errors in this test
1 parent 8a9515d commit ec8e039

2 files changed

Lines changed: 70 additions & 8 deletions

File tree

src/testRunner/unittests/tscWatch/resolutionCache.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ declare module "fs" {
263263
}
264264
}`,
265265
});
266+
sys.runQueuedTimeoutCallbacks();
266267
},
267268
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
268269
},

tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js

Lines changed: 69 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ exitCode:: ExitStatus.undefined
7777

7878
Change:: npm install node types
7979

80-
Input::
80+
Before running Timeout callback:: count: 1
81+
7: timerToInvalidateFailedLookupResolutions
82+
Output::
83+
sysLog:: /users/username/projects/project/node_modules:: Changing watcher to PresentFileSystemEntryWatcher
84+
85+
8186
//// [/users/username/projects/project/node_modules/@types/node/package.json]
8287

8388
{
@@ -94,10 +99,6 @@ declare module "fs" {
9499
}
95100

96101

97-
Output::
98-
sysLog:: /users/username/projects/project/node_modules:: Changing watcher to PresentFileSystemEntryWatcher
99-
100-
101102
PolledWatches::
102103
/users/username/projects/node_modules:
103104
{"pollingInterval":500}
@@ -123,14 +124,74 @@ FsWatchesRecursive::
123124
Timeout callback:: count: 1
124125
7: timerToInvalidateFailedLookupResolutions *new*
125126

126-
Before running Timeout callback:: count: 1
127-
7: timerToInvalidateFailedLookupResolutions
128-
129127
Host is moving to new time
130128
After running Timeout callback:: count: 1
131129

132130
Timeout callback:: count: 1
133131
8: timerToUpdateProgram *new*
134132

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

136197
exitCode:: ExitStatus.undefined

0 commit comments

Comments
 (0)