@@ -950,8 +950,8 @@ import b = require("./moduleB");
950950 {
951951 const f1 = { name : "/root/src/app.ts" } ;
952952 const f2 = { name : "/root/src/types/lib/typings/lib.d.ts" } ;
953- const package = { name : "/root/src/types/lib/package.json" , content : JSON . stringify ( { types : "typings/lib.d.ts" } ) } ;
954- test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ true , f1 , f2 , package ) ;
953+ const packageFile = { name : "/root/src/types/lib/package.json" , content : JSON . stringify ( { types : "typings/lib.d.ts" } ) } ;
954+ test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ true , f1 , f2 , packageFile ) ;
955955 }
956956 {
957957 const f1 = { name : "/root/src/app.ts" } ;
@@ -961,8 +961,8 @@ import b = require("./moduleB");
961961 {
962962 const f1 = { name : "/root/src/app.ts" } ;
963963 const f2 = { name : "/root/src/node_modules/lib/typings/lib.d.ts" } ;
964- const package = { name : "/root/src/node_modules/lib/package.json" , content : JSON . stringify ( { types : "typings/lib.d.ts" } ) } ;
965- test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ false , f1 , f2 , package ) ;
964+ const packageFile = { name : "/root/src/node_modules/lib/package.json" , content : JSON . stringify ( { types : "typings/lib.d.ts" } ) } ;
965+ test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ false , f1 , f2 , packageFile ) ;
966966 }
967967 {
968968 const f1 = { name : "/root/src/app.ts" } ;
@@ -972,8 +972,8 @@ import b = require("./moduleB");
972972 {
973973 const f1 = { name : "/root/src/app.ts" } ;
974974 const f2 = { name : "/root/src/node_modules/@types/lib/typings/lib.d.ts" } ;
975- const package = { name : "/root/src/node_modules/@types/lib/package.json" , content : JSON . stringify ( { types : "typings/lib.d.ts" } ) } ;
976- test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ false , f1 , f2 , package ) ;
975+ const packageFile = { name : "/root/src/node_modules/@types/lib/package.json" , content : JSON . stringify ( { types : "typings/lib.d.ts" } ) } ;
976+ test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ false , f1 , f2 , packageFile ) ;
977977 }
978978 } ) ;
979979 it ( "Can be resolved from secondary location" , ( ) => {
@@ -990,8 +990,8 @@ import b = require("./moduleB");
990990 {
991991 const f1 = { name : "/root/src/app.ts" } ;
992992 const f2 = { name : "/root/node_modules/lib/typings/lib.d.ts" } ;
993- const package = { name : "/root/node_modules/lib/package.json" , content : JSON . stringify ( { typings : "typings/lib.d.ts" } ) } ;
994- test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ false , f1 , f2 , package ) ;
993+ const packageFile = { name : "/root/node_modules/lib/package.json" , content : JSON . stringify ( { typings : "typings/lib.d.ts" } ) } ;
994+ test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ false , f1 , f2 , packageFile ) ;
995995 }
996996 {
997997 const f1 = { name : "/root/src/app.ts" } ;
@@ -1001,8 +1001,8 @@ import b = require("./moduleB");
10011001 {
10021002 const f1 = { name : "/root/src/app.ts" } ;
10031003 const f2 = { name : "/root/node_modules/@types/lib/typings/lib.d.ts" } ;
1004- const package = { name : "/root/node_modules/@types/lib/package.json" , content : JSON . stringify ( { typings : "typings/lib.d.ts" } ) } ;
1005- test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ false , f1 , f2 , package ) ;
1004+ const packageFile = { name : "/root/node_modules/@types/lib/package.json" , content : JSON . stringify ( { typings : "typings/lib.d.ts" } ) } ;
1005+ test ( /*typesRoot*/ "/root/src/types" , /* typeDirective */ "lib" , /*primary*/ false , f1 , f2 , packageFile ) ;
10061006 }
10071007 } ) ;
10081008 it ( "Primary resolution overrides secondary resolutions" , ( ) => {
0 commit comments