fix(compiler-cli): diagnostics file paths relative to cwd, not tsconfig (#19748)

PR Close #19748
This commit is contained in:
Alex Eagle
2017-10-16 12:31:25 -04:00
committed by Tobias Bosch
parent c0cc6eeca1
commit 56774dfb79
6 changed files with 19 additions and 17 deletions

View File

@ -44,6 +44,7 @@ describe('ngc transformer command-line', () => {
beforeEach(() => {
errorSpy = jasmine.createSpy('consoleError').and.callFake(console.error);
basePath = makeTempDir();
process.chdir(basePath);
write = (fileName: string, content: string) => {
const dir = path.dirname(fileName);
if (dir != '.') {

View File

@ -112,7 +112,7 @@ export function setup(): TestSupport {
export function expectNoDiagnostics(options: ng.CompilerOptions, diags: ng.Diagnostics) {
const errorDiags = diags.filter(d => d.category !== ts.DiagnosticCategory.Message);
if (errorDiags.length) {
throw new Error(`Expected no diagnostics: ${ng.formatDiagnostics(options, errorDiags)}`);
throw new Error(`Expected no diagnostics: ${ng.formatDiagnostics(errorDiags)}`);
}
}