Skip to content

Commit

Permalink
[issue-#3-hooks] Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Bebbington committed Jun 22, 2020
1 parent d26bcf8 commit c11a979
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ export class RhumRunner {
public run(): void {
const tc = new TestCase(this.plan);
tc.run();
this.deconstruct()
}

// FILE MARKER - METHODS - PROTECTED /////////////////////////////////////////
Expand Down Expand Up @@ -280,6 +281,17 @@ export class RhumRunner {

return newName;
}

/**
* 'Empty' this object. After calling this, Rhum should be ready for another Plan
*/
protected deconstruct (): void {
this.passed_in_test_suite = ""
this.passed_in_test_plan = ""
this.test_plan_in_progress = ""
this.test_suite_in_progress = ""
this.plan = { suites: {} }
}
}

export const Rhum = new RhumRunner();
2 changes: 1 addition & 1 deletion tests/integration/basic_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Deno.test({
async fn(): Promise<void> {
const p = await Deno.run({
cmd: [
"deno cache example_tests/basic/tests_pass.ts && deno test --allow-run example_tests/basic/tests_pass.ts",
"deno test --allow-run example_tests/basic/tests_pass.ts",
],
stdout: "piped",
stderr: "piped",
Expand Down

0 comments on commit c11a979

Please sign in to comment.