Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

Commit

Permalink
fix: Find correct target for integration tests
Browse files Browse the repository at this point in the history
Refs: #15
  • Loading branch information
hdevalke committed Feb 11, 2020
1 parent d04b04e commit 60d1f43
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/RustTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,14 @@ export class RustTests {
for (const t of pkg.targets) {
let target_dir = dirname(t.src_path);
if (uri.startsWith(target_dir)) {
target = t;
break;
const found = t.kind.find(e => e === "test");
if (
found === undefined ||
(found && basename(t.src_path) === basename(uri))
) {
target = t;
break;
}
}
}
}
Expand Down

0 comments on commit 60d1f43

Please sign in to comment.