mirror of
https://github.com/markedjs/marked
synced 2024-11-21 15:54:33 +00:00
chore: clean up files (#3529)
* chore: show percentage slower in bench * chore: remove jasmine.json
This commit is contained in:
parent
bd22323c09
commit
cf4e518348
12
jasmine.json
12
jasmine.json
@ -1,12 +0,0 @@
|
||||
{
|
||||
"spec_dir": "test",
|
||||
"spec_files": [
|
||||
"**/*-spec.js"
|
||||
],
|
||||
"helpers": [
|
||||
"helpers/helpers.js"
|
||||
],
|
||||
"jsLoader": "import",
|
||||
"stopSpecOnExpectationFailure": false,
|
||||
"random": true
|
||||
}
|
7
test/bench.js
vendored
7
test/bench.js
vendored
@ -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`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user