Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e568ceb

Browse files
committedFeb 29, 2024
Update test runner to not ignore reference directives errors
Signed-off-by: Hana Joo <hanajoo@google.com>
1 parent d3dde7e commit e568ceb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed
 

‎src/testRunner/compilerRunner.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -733,23 +733,18 @@ export class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest {
733733
fixerOptions.isolatedDeclarations = true;
734734
const fixResults = fixTestFiles(env.fileSystem, env.programFileNames, fixerOptions);
735735

736-
const hasReferenceDirectiveErrors = fixResults.success && fixResults.unfixedDiagnostics.some(d => FixedIsolatedDeclarationTest.referenceDirectiveErrors.has(d.code));
737736
for (const file of env.allFiles) {
738737
const content = env.fileSystem.readFileSync(file.unitName, "utf-8");
739738
file.content = content;
740739
}
741740

742-
if (!fixResults.success || hasReferenceDirectiveErrors) {
741+
if (!fixResults.success) {
743742
return undefined;
744743
}
745744
env.fileSystem.makeReadonly();
746745
env.fileSystem = env.fileSystem.shadow();
747746
return env;
748747
}
749-
private static referenceDirectiveErrors = new Set([
750-
ts.Diagnostics.Declaration_emit_for_this_expression_requires_adding_a_type_reference_directive_to_0_with_isolatedDeclarations.code,
751-
ts.Diagnostics.Declaration_emit_for_this_expression_requires_adding_a_path_reference_directive_to_0_with_isolatedDeclarations.code,
752-
]);
753748

754749
protected override get baselinePath() {
755750
return "isolated-declarations/auto-fixed";

0 commit comments

Comments
 (0)
Please sign in to comment.