mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-16 15:51:35 -05:00
Handle empty string when getting file version (#51689)
* Test for empty string change * Fix empty string for file versioning
This commit is contained in:
@@ -717,6 +717,16 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
|
||||
change: sys => sys.replaceFileText("/user/username/projects/project/main.ts", "Hello", "Hello World"),
|
||||
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
|
||||
},
|
||||
{
|
||||
caption: "receive another change event without modifying the file",
|
||||
change: sys => sys.invokeFsWatches("/user/username/projects/project/main.ts", "change", /*modifiedTime*/ undefined, /*useTildeSuffix*/ undefined),
|
||||
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
|
||||
},
|
||||
{
|
||||
caption: "change main.ts to empty text",
|
||||
change: sys => sys.writeFile("/user/username/projects/project/main.ts", ""),
|
||||
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
|
||||
},
|
||||
{
|
||||
caption: "receive another change event without modifying the file",
|
||||
change: sys => sys.invokeFsWatches("/user/username/projects/project/main.ts", "change", /*modifiedTime*/ undefined, /*useTildeSuffix*/ undefined),
|
||||
|
||||
Reference in New Issue
Block a user