@@ -7,8 +7,10 @@ import { CompilerOptions } from "../../src/CompilerOptions";
77export class RequireTests {
88
99 @TestCase ( "file.ts" , "./folder/Module" , "folder.Module" , { rootDir : "." } , false )
10+ @TestCase ( "file.ts" , "./folder/Module" , "folder.Module" , { rootDir : "./" } , false )
1011 @TestCase ( "src/file.ts" , "./folder/Module" , "src.folder.Module" , { rootDir : "." } , false )
1112 @TestCase ( "file.ts" , "folder/Module" , "folder.Module" , { rootDir : "." , baseUrl : "." } , false )
13+ @TestCase ( "file.ts" , "folder/Module" , "folder.Module" , { rootDir : "./" , baseUrl : "." } , false )
1214 @TestCase ( "src/file.ts" , "./folder/Module" , "folder.Module" , { rootDir : "src" } , false )
1315 @TestCase ( "src/file.ts" , "./folder/Module" , "folder.Module" , { rootDir : "./src" } , false )
1416 @TestCase ( "file.ts" , "../Module" , "" , { rootDir : "./src" } , true )
@@ -22,7 +24,6 @@ export class RequireTests {
2224 options : CompilerOptions ,
2325 throwsError : boolean ) : void {
2426 const regex = / r e q u i r e \( " ( .* ?) " \) / ; // This regex extracts `hello` from require("hello")
25- options . rootDir = path . resolve ( options . rootDir ) ; // This happens automatically from the command line
2627 if ( throwsError ) {
2728 Expect ( ( ) => util . transpileString ( `import * from "${ usedPath } ";` , options , true , filePath ) ) . toThrow ( ) ;
2829 } else {
0 commit comments