@@ -4,7 +4,6 @@ import * as util from "../util";
44import * as ts from "typescript" ;
55import { BuildMode } from "../../src" ;
66import { normalizeSlashes } from "../../src/utils" ;
7- import { pathsWithoutBaseUrl } from "../../src/transpilation/diagnostics" ;
87
98describe ( "basic module resolution" , ( ) => {
109 const projectPath = path . resolve ( __dirname , "module-resolution" , "project-with-node-modules" ) ;
@@ -457,6 +456,7 @@ describe("module resolution should not try to resolve modules in noResolvePaths"
457456
458457 export const result = b.foo();
459458 `
459+ . addExtraFile ( "preload.d.ts" , `declare module "preload" {}` )
460460 . addExtraFile ( "preload.lua" , 'package.preload["ignoreme"] = function() return nil end' )
461461 . addExtraFile (
462462 "actualfile.ts" ,
@@ -598,7 +598,7 @@ test("module resolution uses baseURL to resolve imported files", () => {
598598 return { baz = function() return "baz" end }
599599 `
600600 )
601- . setOptions ( { baseUrl : "./myproject/mydeps" } )
601+ . setOptions ( { baseUrl : "./myproject/mydeps" , ignoreDeprecations : "6.0" } )
602602 . expectToEqual ( {
603603 fooResult : "foo" ,
604604 barResult : "bar" ,
@@ -707,10 +707,6 @@ test("supports complicated paths configuration", () => {
707707 . expectToEqual ( { foo : 314 , bar : 271 } ) ;
708708} ) ;
709709
710- test ( "paths without baseUrl is error" , ( ) => {
711- util . testFunction `` . setOptions ( { paths : { } } ) . expectToHaveDiagnostics ( [ pathsWithoutBaseUrl . code ] ) ;
712- } ) ;
713-
714710test ( "module resolution using plugin" , ( ) => {
715711 const baseProjectPath = path . resolve ( __dirname , "module-resolution" , "project-with-module-resolution-plugin" ) ;
716712 const projectTsConfig = path . join ( baseProjectPath , "tsconfig.json" ) ;
0 commit comments