File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2464,4 +2464,28 @@ namespace ts.projectSystem {
24642464
24652465 } ) ;
24662466 } ) ;
2467+
2468+ describe ( "No overwrite emit error" , ( ) => {
2469+ it ( "for inferred project" , ( ) => {
2470+ const f1 = {
2471+ path : "/a/b/f1.js" ,
2472+ content : "function test1() { }"
2473+ } ;
2474+ const host = createServerHost ( [ f1 , libFile ] ) ;
2475+ const session = createSession ( host ) ;
2476+ openFilesForSession ( [ f1 ] , session ) ;
2477+
2478+ const projectService = session . getProjectService ( ) ;
2479+ checkNumberOfProjects ( projectService , { inferredProjects : 1 } ) ;
2480+ const projectName = projectService . inferredProjects [ 0 ] . getProjectName ( ) ;
2481+
2482+ const diags = session . executeCommand ( < server . protocol . CompilerOptionsDiagnosticsRequest > {
2483+ type : "request" ,
2484+ command : server . CommandNames . CompilerOptionsDiagnosticsFull ,
2485+ seq : 2 ,
2486+ arguments : { projectFileName : projectName }
2487+ } ) . response ;
2488+ assert . isTrue ( diags . length === 0 ) ;
2489+ } ) ;
2490+ } ) ;
24672491}
You can’t perform that action at this time.
0 commit comments