@@ -24,8 +24,7 @@ describe("updateTsConfig", () => {
2424 beforeEach ( ( ) => {
2525 ctx = createTestContext ( ) ;
2626 ctx . args . ts = true ;
27- ctx . template . installWorkersTypes = false ;
28- ctx . template . skipWranglerTypegen = false ;
27+ ctx . template . workersTypes = "generated" ;
2928
3029 vi . mocked ( existsSync ) . mockImplementation ( ( ) => true ) ;
3130 vi . mocked ( getLatestTypesEntrypoint ) . mockReturnValue ( mockCompatDate ) ;
@@ -37,8 +36,8 @@ describe("updateTsConfig", () => {
3736 } ) ;
3837
3938 test ( "installing workers types" , async ( ) => {
40- ctx . template . installWorkersTypes = true ;
41- ctx . template . skipWranglerTypegen = true ;
39+ ctx . template . workersTypes = "installed" ;
40+
4241 await updateTsConfig ( ctx ) ;
4342
4443 expect ( writeFile ) . toHaveBeenCalled ( ) ;
@@ -55,17 +54,16 @@ describe("updateTsConfig", () => {
5554 } ) ;
5655
5756 test ( "latest entrypoint not found" , async ( ) => {
58- ctx . template . installWorkersTypes = true ;
59- ctx . template . skipWranglerTypegen = true ;
57+ ctx . template . workersTypes = "installed" ;
58+
6059 vi . mocked ( getLatestTypesEntrypoint ) . mockReturnValue ( null ) ;
6160 await updateTsConfig ( ctx ) ;
6261
6362 expect ( writeFile ) . not . toHaveBeenCalled ( ) ;
6463 } ) ;
6564
6665 test ( "don't clobber existing entrypoints" , async ( ) => {
67- ctx . template . installWorkersTypes = true ;
68- ctx . template . skipWranglerTypegen = true ;
66+ ctx . template . workersTypes = "installed" ;
6967 vi . mocked ( readFile ) . mockImplementation (
7068 ( ) =>
7169 `{ "compilerOptions": { "types" : ["@cloudflare/workers-types/2021-03-20"]} }` ,
0 commit comments