Skip to content

Commit

Permalink
test_runner: update runner with new AST signature
Browse files Browse the repository at this point in the history
  • Loading branch information
manekinekko committed Oct 12, 2022
1 parent 9ac8496 commit d97256a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/internal/test_runner/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class FileTest extends Test {
break;

case TokenKind.TAP_PLAN:
this.reporter.plan(indent, node.plan.end - node.plan.start + 1);
this.reporter.plan(indent, node.end - node.start + 1);
break;

case TokenKind.TAP_SUBTEST_POINT:
Expand All @@ -152,31 +152,31 @@ class FileTest extends Test {
case TokenKind.TAP_TEST_OK:
case TokenKind.TAP_TEST_NOTOK:
// eslint-disable-next-line no-case-declarations
const { todo, skip, pass } = node.test.status;
const { todo, skip, pass } = node.status;
// eslint-disable-next-line no-case-declarations
let directive = {};

if (todo) {
directive = this.reporter.getTodo(node.test.reason);
directive = this.reporter.getTodo(node.reason);
}

if (skip) {
directive = this.reporter.getSkip(node.test.reason);
directive = this.reporter.getSkip(node.reason);
}

if (pass) {
this.reporter.ok(
indent,
node.test.id,
node.test.description,
node.id,
node.description,
null,
directive
);
} else {
this.reporter.fail(
indent,
node.test.id,
node.test.description,
node.id,
node.description,
null,
directive
);
Expand Down

0 comments on commit d97256a

Please sign in to comment.