mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
workspace: add nyc coverage test
This commit is contained in:
1 parent
7903d012da
commit
b48dc5344a
5 files changed
+7
-10
No files matched your search
@@ -11,6 +11,8 @@ dist/
|
||||
*.tsbuildinfo
|
||||
*.hydro
|
||||
.coverage
|
||||
coverage
|
||||
.nyc_output
|
||||
benchmark.json
|
||||
globalConfig.json
|
||||
*.out
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
extension: [.js, .ts, .jsx, .tsx]
|
||||
exclude: [node_modules, .yarn]
|
||||
reporter: [text, lcov]
|
||||
@@ -58,6 +58,7 @@
|
||||
"mocha": "^10.0.0",
|
||||
"mongodb": "^3.7.3",
|
||||
"mongodb-memory-server": "^8.8.0",
|
||||
"nyc": "^15.1.0",
|
||||
"ora": "^6.1.2",
|
||||
"semver": "^7.3.7",
|
||||
"supertest": "^6.2.4",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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[] = [];
|
||||
|
||||
Reference in new issue
Block a user