@@ -27,6 +27,7 @@ func verifyWatch(t *testing.T, test *tscInput, scenario string, edits []*testTsc
27
27
baselineBuilder .WriteString ("\n \n " )
28
28
29
29
// build initial state
30
+ execute .StartForTest (watcher )
30
31
execute .RunWatchCycle (watcher )
31
32
test .sys .serializeState (baselineBuilder )
32
33
@@ -44,6 +45,29 @@ func verifyWatch(t *testing.T, test *tscInput, scenario string, edits []*testTsc
44
45
})
45
46
}
46
47
48
+ func TestWatch (t * testing.T ) {
49
+ t .Parallel ()
50
+ if ! bundled .Embedded {
51
+ // Without embedding, we'd need to read all of the lib files out from disk into the MapFS.
52
+ // Just skip this for now.
53
+ t .Skip ("bundled files are not embedded" )
54
+ }
55
+
56
+ testCases := []* tscInput {
57
+ {
58
+ subScenario : "watch with no tsconfig" ,
59
+ sys : newTestSys (FileMap {
60
+ "/home/src/workspaces/project/index.ts" : "" ,
61
+ }, "/home/src/workspaces/project" ),
62
+ commandLineArgs : []string {"index.ts" , "--watch" },
63
+ },
64
+ }
65
+
66
+ for _ , test := range testCases {
67
+ verifyWatch (t , test , "commandLineWatch" , nil )
68
+ }
69
+ }
70
+
47
71
func listToTsconfig (base string , tsconfigOpts ... string ) (string , string ) {
48
72
optionString := strings .Join (tsconfigOpts , ",\n " )
49
73
tsconfigText := `{
0 commit comments