workspace: add nyc coverage test

This commit is contained in:
undefined committed 2022-08-24 15:00:41 +08:00
1 parent 7903d012da
commit b48dc5344a
5 files changed
+7 -10

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.22.11",
"version": "2.22.12",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
-9
View File
@@ -1,4 +1,3 @@
import crypto from 'crypto';
import { EventEmitter } from 'events';
import path from 'path';
import fs from 'fs-extra';
@@ -16,14 +15,6 @@ export function parseFilename(filePath: string) {
return t[t.length - 1];
}
const encrypt = (algorithm: string, content: crypto.BinaryLike) => {
const hash = crypto.createHash(algorithm);
hash.update(content);
return hash.digest('hex');
};
export const md5 = (content: string) => encrypt('md5', content);
export class Queue<T> extends EventEmitter {
queue: T[] = [];
waiting: any[] = [];