From cf4e518348342ff78134cddf2c3efaabf83c0f91 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Sat, 9 Nov 2024 22:04:55 -0700 Subject: [PATCH] chore: clean up files (#3529) * chore: show percentage slower in bench * chore: remove jasmine.json --- jasmine.json | 12 ------------ test/bench.js | 7 +++++++ 2 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 jasmine.json diff --git a/jasmine.json b/jasmine.json deleted file mode 100644 index c2728eef27..0000000000 --- a/jasmine.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "spec_dir": "test", - "spec_files": [ - "**/*-spec.js" - ], - "helpers": [ - "helpers/helpers.js" - ], - "jsLoader": "import", - "stopSpecOnExpectationFailure": false, - "random": true -} diff --git a/test/bench.js b/test/bench.js index d7455215fc..a368c7038e 100644 --- a/test/bench.js +++ b/test/bench.js @@ -118,6 +118,13 @@ export async function bench(tests, specs) { const percent = ((stats[name].correct / specs.length) * 100).toFixed(2); console.log(`${name} completed in ${ms}ms and passed ${percent}%`); } + + const percentSlower = (( + prettyElapsedTime(stats['esm marked'].elapsed) + / prettyElapsedTime(stats.commonmark.elapsed) + ) - 1) * 100; + + console.log(`${Math.round(percentSlower)}% slower than commonmark`); } /**