tronlobi.blogg.se

Jest clear all mocks
Jest clear all mocks





jest clear all mocks

because printing diagnostics can bail if the category was error * move checkedFiles.add to the beginning of typecheckFile and because `declarations` dict is empty when `declaration: false`, so can't check against that since `parsedConfig.fileNames` could include files that were already checked during the `transform` hook * add new checkedFiles Set to not duplicate type-checking if `declaration: false` not the most common use-case for rpt2, but it is one remove the check against the `declarations` dict as one can type-check without outputting declarations and this means it's only called once per build, vs. `buildEnd` is a more correct place for it, since this does not generate any output files * move misssed type-checking to `buildEnd` hook, remove declarations check _already_ generate declarations for those files)) That the user wanted type-checking and declarations for (as we these would basically be independent TS files not part of the bundle _not_ type-only) that are in the `include` and weren't

jest clear all mocks

JEST CLEAR ALL MOCKS FULL

(_technically_ speaking, there could be full TS files we do the same process for generating declarations for "missed"įiles right now in `_onwrite`, so basically do the same thing but Using glob patterns in `include`) - this is just a workaround, Particular if one is using `tsconfig` `files` (or in general _not_ note that this will not catch _all_ type-only imports, in in `parsedConfig.fileNames`) are also type-checked so, as a workaround, make sure that all files in the `tsconfig` type-only files never get processed by Rollup as their imports areĮlided/removed by TS in the resulting compiled JS file * fix: type-check `include`d files missed by transform (type-only files) Wherever I was mocking modules or making spyOn.







Jest clear all mocks