Skip to content

Commit

Permalink
Merge pull request #117 from drashland/update-dependencies-bump-versi…
Browse files Browse the repository at this point in the history
…on-numbers

chore: Update dependencies and bump version numbers across repo
  • Loading branch information
crookse authored May 20, 2021
2 parents 2644c79 + 07d0c53 commit 79fe6e9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 291 deletions.
8 changes: 4 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { ServerRequest } from "https://deno.land/std@0.93.0/http/server.ts";
export { ServerRequest } from "https://deno.land/std@0.97.0/http/server.ts";

export { BufReader } from "https://deno.land/std@0.93.0/io/bufio.ts";
export { BufReader } from "https://deno.land/std@0.97.0/io/bufio.ts";

export * as StdAsserts from "https://deno.land/std@0.93.0/testing/asserts.ts";
export * as StdAsserts from "https://deno.land/std@0.97.0/testing/asserts.ts";

export * as colors from "https://deno.land/std@0.93.0/fmt/colors.ts";
export * as colors from "https://deno.land/std@0.97.0/fmt/colors.ts";
15 changes: 8 additions & 7 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,24 +419,25 @@ export class RhumRunner {
`${this.passed_in_test_plan} | ${this.passed_in_test_suite} | ${name}`;
return newName;
}

if (this.test_plan_in_progress != this.passed_in_test_plan) {
this.test_plan_in_progress = this.passed_in_test_plan;
this.test_suite_in_progress = this.passed_in_test_suite;
newName = `${"\u0008".repeat(name.length + extraChars)}` + // strip "test "
`${" ".repeat(name.length + extraChars)}` +
`\n${this.passed_in_test_plan}` +
`\n ${this.passed_in_test_suite}` +
`\n ${name} ... `;
newName =
`${
"\u0008".repeat(name.length + extraChars)
} ${this.passed_in_test_suite}` +
`\n ${name}`;
} else {
if (this.test_suite_in_progress != this.passed_in_test_suite) {
this.test_suite_in_progress = this.passed_in_test_suite;
newName = `${"\u0008".repeat(name.length + extraChars)}` +
` ${this.passed_in_test_suite}` +
`${" ".repeat(name.length + extraChars)}` +
`\n ${name} ... `;
`\n ${name}`;
} else {
newName = `${"\u0008".repeat(name.length + extraChars)}` +
` ${name} ... `;
` ${name}`;
}
}

Expand Down
12 changes: 6 additions & 6 deletions src/test_case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export class TestCase {
// Run cases
this.plan!.suites[suiteName].cases!.forEach(
async (c: ITestCase, caseIndex) => {
const isLastCase =
(this.plan!.suites[suiteName].cases!.length - 1) == caseIndex;
const isLastSuite =
(Object.keys(this.plan!.suites).length - 1) == suiteIndex;
// Run the case - required to run like this because the
// hooks need to be ran inside the Deno.test call. Deno.test seems to queue
// the tests, meaning all hooks are ran, and **then** the tests are ran
Expand Down Expand Up @@ -72,8 +76,6 @@ export class TestCase {
if (this.plan.suites[suiteName].after_each_case_hook) {
await this.plan.suites[suiteName].after_each_case_hook!();
}
const isLastCase =
(this.plan!.suites[suiteName].cases!.length - 1) == caseIndex;
if (
this.plan.suites[suiteName].after_all_case_hook &&
!executedAfterAllCaseHook && isLastCase
Expand All @@ -87,8 +89,6 @@ export class TestCase {
await this.plan.after_each_suite_hook();
executedAfterEachSuiteHook = true;
}
const isLastSuite =
(Object.keys(this.plan!.suites).length - 1) == suiteIndex;
if (
this.plan.after_all_suite_hook && !executedAfterAllSuiteHook &&
isLastSuite
Expand All @@ -107,8 +107,8 @@ export class TestCase {
await hookAttachedTestFn();
});
} else {
await Deno.test(c.name, async () => {
Deno.stdout.writeSync(encoder.encode(c.new_name));
await Deno.test(c.new_name, async () => {
// Deno.stdout.writeSync(encoder.encode(c.new_name));
await hookAttachedTestFn();
});
}
Expand Down
274 changes: 0 additions & 274 deletions tests/integration/basic_test.ts

This file was deleted.

0 comments on commit 79fe6e9

Please sign in to comment.