Skip to content

Commit 619256e

Browse files
committed
JavaScript: Fix existing tests and test runner
Fixes two things: - The basic test should no longer extract `tst.js` (as `tst.ts` is present) - The `AutoBuild` mock did not populate `extractedFiles` correctly, which broke the logic that looks for TypeScript files with the same basename.
1 parent 8829f78 commit 619256e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript/extractor/test/com/semmle/js/extractor/test/AutoBuildTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public void extractTypeScriptFiles(
135135
FileExtractors extractors) {
136136
for (Path f : files) {
137137
actual.add(f.toString());
138+
extractedFiles.add(f);
138139
}
139140
}
140141

@@ -175,7 +176,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
175176

176177
@Test
177178
public void basicTest() throws IOException {
178-
addFile(true, LGTM_SRC, "tst.js");
179+
addFile(false, LGTM_SRC, "tst.js");
179180
addFile(true, LGTM_SRC, "tst.ts");
180181
addFile(true, LGTM_SRC, "tst.html");
181182
addFile(true, LGTM_SRC, "tst.xsjs");

0 commit comments

Comments
 (0)