@@ -20,26 +20,26 @@ const ts = require(require.resolve('typescript', { paths: [parserPath] }));
2020// linting of every file in the project with
2121// `Parsing error: ENOENT ... <project>/declarations/.tsbuildinfo`.
2222describe ( 'patched ts.sys.readFile — .tsbuildinfo handling' , ( ) => {
23- patchTs ( ) ;
23+ patchTs ( ) ;
2424
25- it ( 'treats a missing custom-named .tsbuildinfo as absent instead of throwing' , ( ) => {
26- // e.g. { "tsBuildInfoFile": "declarations/.tsbuildinfo" } — only the
27- // default `tsconfig.tsbuildinfo` name was guarded before.
28- const missing = path . join ( os . tmpdir ( ) , 'ee-parser-no-such-dir' , 'declarations' , '.tsbuildinfo' ) ;
25+ it ( 'treats a missing custom-named .tsbuildinfo as absent instead of throwing' , ( ) => {
26+ // e.g. { "tsBuildInfoFile": "declarations/.tsbuildinfo" } — only the
27+ // default `tsconfig.tsbuildinfo` name was guarded before.
28+ const missing = path . join ( os . tmpdir ( ) , 'ee-parser-no-such-dir' , 'declarations' , '.tsbuildinfo' ) ;
2929
30- expect ( ( ) => ts . sys . readFile ( missing ) ) . not . toThrow ( ) ;
31- expect ( ts . sys . readFile ( missing ) ) . toBe ( '' ) ;
32- } ) ;
30+ expect ( ( ) => ts . sys . readFile ( missing ) ) . not . toThrow ( ) ;
31+ expect ( ts . sys . readFile ( missing ) ) . toBe ( '' ) ;
32+ } ) ;
3333
34- it ( 'returns the real content when the .tsbuildinfo exists' , ( ) => {
35- const dir = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , 'ee-parser-buildinfo-' ) ) ;
36- const buildInfo = path . join ( dir , 'custom.tsbuildinfo' ) ;
37- fs . writeFileSync ( buildInfo , '{"version":"5.9.3"}' ) ;
34+ it ( 'returns the real content when the .tsbuildinfo exists' , ( ) => {
35+ const dir = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , 'ee-parser-buildinfo-' ) ) ;
36+ const buildInfo = path . join ( dir , 'custom.tsbuildinfo' ) ;
37+ fs . writeFileSync ( buildInfo , '{"version":"5.9.3"}' ) ;
3838
39- try {
40- expect ( ts . sys . readFile ( buildInfo ) ) . toBe ( '{"version":"5.9.3"}' ) ;
41- } finally {
42- fs . rmSync ( dir , { recursive : true , force : true } ) ;
43- }
44- } ) ;
39+ try {
40+ expect ( ts . sys . readFile ( buildInfo ) ) . toBe ( '{"version":"5.9.3"}' ) ;
41+ } finally {
42+ fs . rmSync ( dir , { recursive : true , force : true } ) ;
43+ }
44+ } ) ;
4545} ) ;
0 commit comments