Skip to content

Commit

Permalink
Merge pull request #95 from elonmallin/test-explorer
Browse files Browse the repository at this point in the history
Test explorer with gutters and change listeners
  • Loading branch information
elonmallin authored Dec 3, 2023
2 parents 76f5913 + d9b199f commit 8401508
Show file tree
Hide file tree
Showing 19 changed files with 677 additions and 333 deletions.
2 changes: 1 addition & 1 deletion src/PhpParser/TestDiffParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function getTestFailedDiff(output: string): TestDiffParser {

return new TestDiffParser(message, expected, actual);
} else {
const [, expected, ,actual] = /^Failed asserting that (.*) (is|are) (.*)\.$/im.exec(output)!;
const [, expected, ,actual] = /^Failed asserting that (.*) (is|are|matches expected) (.*)\.$/im.exec(output)!;

return new TestDiffParser(message, expected, actual);
}
Expand Down
47 changes: 0 additions & 47 deletions src/TestProvider/PhpunitTestCase.ts

This file was deleted.

80 changes: 0 additions & 80 deletions src/TestProvider/PhpunitTestFile.ts

This file was deleted.

92 changes: 0 additions & 92 deletions src/TestProvider/PhpunitTestFileParser.ts

This file was deleted.

10 changes: 10 additions & 0 deletions src/TestProvider/TestCases/ITestCase.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Range, TestController, TestItem, TestRun, Uri } from "vscode";

export interface ITestCase {
isResolved: boolean;
getId(): string;
getLabel(): string;
getRange(): Range | undefined;
// resolve(lazy: boolean): Promise<void>;
run(item: TestItem, options: TestRun): Promise<boolean>;
}
14 changes: 14 additions & 0 deletions src/TestProvider/TestCases/TestCaseNode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Range } from "vscode";

export type TestCaseNodeKind = 'namespace' | 'class' | 'method';

export class TestCaseNode {
constructor(
public kind: TestCaseNodeKind,
public name: string,
public range: Range,
public parent: TestCaseNode | undefined = undefined,
public tags: string[] = [],
public children: TestCaseNode[] = [],
) {}
}
Loading

0 comments on commit 8401508

Please sign in to comment.