Skip to content

Commit 0abe081

Browse files
committed
Use statements as accumulator & print size of test titles vs statement count.
1 parent 5a3bda1 commit 0abe081

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bin/handlers.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ class Visitor {
2626

2727
export async function checkSpecText({specUrl, suiteLog}) {
2828
const specUrls = Array.isArray(specUrl) ? specUrl : [specUrl];
29-
const nodes = [];
29+
const statements = [];
3030
const specVisitor = new Visitor({
3131
condition: textNodeWithMust,
32-
accumulator: nodes,
32+
accumulator: statements,
3333
props: ['childNodes']
3434
});
3535
const tests = [];
@@ -51,6 +51,9 @@ export async function checkSpecText({specUrl, suiteLog}) {
5151
testVisitor.visit({nodes: log.tests});
5252
}
5353
const testTitles = new Set(tests.map(test => test?.title));
54+
const normStatements = new Set(statements);
55+
console.log(`Test Title Count ${testTitles.size}`);
56+
console.log(`Normative Statement Count ${normStatements.size}`);
5457
}
5558

5659
// the condition for the spec

0 commit comments

Comments
 (0)