@@ -97,16 +97,6 @@ describe('addFile', () => {
9797 const project = createProject ( { project : iff . rootDir } ) ;
9898 expect ( formatDiagnostics ( project . getDiagnostics ( ) , iff . rootDir ) ) . toMatchInlineSnapshot ( `
9999 [
100- {
101- "category": "error",
102- "fileName": "<rootDir>/src/b.module.css",
103- "length": 14,
104- "start": {
105- "column": 10,
106- "line": 1,
107- },
108- "text": "Cannot import module './a.module.css'",
109- },
110100 {
111101 "category": "error",
112102 "fileName": "<rootDir>/src/c.module.css",
@@ -206,20 +196,7 @@ describe('updateFile', () => {
206196 // New semantic diagnostics are reported
207197 await writeFile ( iff . join ( 'src/a.module.css' ) , `@import './non-existent.module.css';` ) ;
208198 project . updateFile ( iff . join ( 'src/a.module.css' ) ) ;
209- expect ( formatDiagnostics ( project . getDiagnostics ( ) , iff . rootDir ) ) . toMatchInlineSnapshot ( `
210- [
211- {
212- "category": "error",
213- "fileName": "<rootDir>/src/a.module.css",
214- "length": 25,
215- "start": {
216- "column": 10,
217- "line": 1,
218- },
219- "text": "Cannot import module './non-existent.module.css'",
220- },
221- ]
222- ` ) ;
199+ expect ( formatDiagnostics ( project . getDiagnostics ( ) , iff . rootDir ) ) . toMatchInlineSnapshot ( `[]` ) ;
223200 } ) ;
224201 test ( 'changes diagnostics in files that import it directly or indirectly' , async ( ) => {
225202 // This test case suggests the following facts:
@@ -320,16 +297,6 @@ describe('removeFile', () => {
320297 project . removeFile ( iff . join ( 'src/a.module.css' ) ) ;
321298 expect ( formatDiagnostics ( project . getDiagnostics ( ) , iff . rootDir ) ) . toMatchInlineSnapshot ( `
322299 [
323- {
324- "category": "error",
325- "fileName": "<rootDir>/src/b.module.css",
326- "length": 14,
327- "start": {
328- "column": 10,
329- "line": 1,
330- },
331- "text": "Cannot import module './a.module.css'",
332- },
333300 {
334301 "category": "error",
335302 "fileName": "<rootDir>/src/c.module.css",
@@ -471,30 +438,7 @@ describe('getDiagnostics', () => {
471438 } ) ;
472439 const project = createProject ( { project : iff . rootDir } ) ;
473440 const diagnostics = project . getDiagnostics ( ) ;
474- expect ( formatDiagnostics ( diagnostics , iff . rootDir ) ) . toMatchInlineSnapshot ( `
475- [
476- {
477- "category": "error",
478- "fileName": "<rootDir>/src/a.module.css",
479- "length": 27,
480- "start": {
481- "column": 10,
482- "line": 1,
483- },
484- "text": "Cannot import module './non-existent-1.module.css'",
485- },
486- {
487- "category": "error",
488- "fileName": "<rootDir>/src/b.module.css",
489- "length": 27,
490- "start": {
491- "column": 10,
492- "line": 1,
493- },
494- "text": "Cannot import module './non-existent-2.module.css'",
495- },
496- ]
497- ` ) ;
441+ expect ( formatDiagnostics ( diagnostics , iff . rootDir ) ) . toMatchInlineSnapshot ( `[]` ) ;
498442 } ) ;
499443 test ( 'skips semantic diagnostics when project or syntactic diagnostics exist' , async ( ) => {
500444 const iff = await createIFF ( {
0 commit comments