@@ -5,8 +5,8 @@ describe("DocumentRegistry", () => {
55 var documentRegistry = ts . createDocumentRegistry ( ) ;
66 var defaultCompilerOptions = ts . getDefaultCompilerOptions ( ) ;
77
8- var f1 = documentRegistry . acquireDocument ( "file1.ts" , defaultCompilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , 1 , false ) ;
9- var f2 = documentRegistry . acquireDocument ( "file1.ts" , defaultCompilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , 1 , false ) ;
8+ var f1 = documentRegistry . acquireDocument ( "file1.ts" , defaultCompilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , "1" , false ) ;
9+ var f2 = documentRegistry . acquireDocument ( "file1.ts" , defaultCompilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , "1" , false ) ;
1010
1111 assert ( f1 === f2 , "DocumentRegistry should return the same document for the same name" ) ;
1212 } ) ;
@@ -17,21 +17,21 @@ describe("DocumentRegistry", () => {
1717
1818 // change compilation setting that doesn't affect parsing - should have the same document
1919 compilerOptions . declaration = true ;
20- var f1 = documentRegistry . acquireDocument ( "file1.ts" , compilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , 1 , false ) ;
20+ var f1 = documentRegistry . acquireDocument ( "file1.ts" , compilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , "1" , false ) ;
2121 compilerOptions . declaration = false ;
22- var f2 = documentRegistry . acquireDocument ( "file1.ts" , compilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , 1 , false ) ;
22+ var f2 = documentRegistry . acquireDocument ( "file1.ts" , compilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , "1" , false ) ;
2323
2424 assert ( f1 === f2 , "Expected to have the same document instance" ) ;
2525
2626
2727 // change value of compilation setting that is used during production of AST - new document is required
2828 compilerOptions . target = ts . ScriptTarget . ES3 ;
29- var f3 = documentRegistry . acquireDocument ( "file1.ts" , compilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , 1 , false ) ;
29+ var f3 = documentRegistry . acquireDocument ( "file1.ts" , compilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , "1" , false ) ;
3030
3131 assert ( f1 !== f3 , "Changed target: Expected to have different instances of document" ) ;
3232
3333 compilerOptions . module = ts . ModuleKind . CommonJS ;
34- var f4 = documentRegistry . acquireDocument ( "file1.ts" , compilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , 1 , false ) ;
34+ var f4 = documentRegistry . acquireDocument ( "file1.ts" , compilerOptions , TypeScript . ScriptSnapshot . fromString ( "var x = 1;" ) , "1" , false ) ;
3535
3636 assert ( f1 !== f4 , "Changed module: Expected to have different instances of document" ) ;
3737 } ) ;
0 commit comments