Replace thirdparty parse-ms with my own, and add tests
Some checks failed
CI / CI (push) Failing after 11s

This commit is contained in:
SileNce5k 2024-10-28 01:43:27 +01:00
parent 5081b9fec9
commit d738a0dcfc
Signed by: SileNce
GPG key ID: B0A142BB4291B204
4 changed files with 900014 additions and 11 deletions

File diff suppressed because it is too large Load diff

12
tests/parse-ms.test.js Normal file
View file

@ -0,0 +1,12 @@
const parseMS = require('../util/parseMS')
const fs = require('fs')
const file = 'tests/expected/parse-ms-expected.json';
const expectedOutput = JSON.parse(fs.readFileSync(file, {encoding: "utf-8"}));
test("Testing my parseMS", () => {
for(let i = 0; i < expectedOutput.length; i++){
const ms = i * i * 2;
expect(parseMS(ms)).toStrictEqual(expectedOutput[i])
}
})