Skip to content

Commit 5657c28

Browse files
committed
Fix the incorrect declaration file path during d.ts file compile in the compilerrunner
1 parent cac1873 commit 5657c28

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

src/harness/compilerRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class CompilerBaselineRunner extends RunnerBase {
246246
var declFile = ts.forEach(result.declFilesCode,
247247
declFile => declFile.fileName === (file.unitName.substr(0, file.unitName.length - ".ts".length) + ".d.ts")
248248
? declFile : undefined);
249-
return { unitName: rootDir + Harness.Path.getFileName(declFile.fileName), content: declFile.code };
249+
return { unitName: declFile.fileName, content: declFile.code };
250250
}
251251
}
252252

tests/baselines/reference/multiImportExport.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,3 @@ export = Math;
6161
//// [Drawing.d.ts]
6262
export import Math = require('Math/Math');
6363
//// [consumer.d.ts]
64-
65-
66-
//// [DtsFileErrors]
67-
68-
69-
==== tests/cases/compiler/consumer.d.ts (0 errors) ====
70-
71-
==== tests/cases/compiler/Drawing.d.ts (1 errors) ====
72-
export import Math = require('Math/Math');
73-
~~~~~~~~~~~
74-
!!! Cannot find external module 'Math/Math'.
75-
76-
==== tests/cases/compiler/Math.d.ts (1 errors) ====
77-
import Adder = require('Math/Adder');
78-
~~~~~~~~~~~~
79-
!!! Cannot find external module 'Math/Adder'.
80-
declare var Math: {
81-
Adder: typeof Adder;
82-
};
83-
export = Math;
84-
85-
==== tests/cases/compiler/Adder.d.ts (0 errors) ====
86-
declare class Adder {
87-
add(a: number, b: number): void;
88-
}
89-
export = Adder;
90-

0 commit comments

Comments
 (0)