MVP back end
This commit is contained in:
parent
528b9f67d4
commit
889fc95c3d
51 changed files with 1048 additions and 426 deletions
|
@ -1,6 +1,12 @@
|
|||
import { delay } from "../../src/core/helper/delay.js";
|
||||
import mongoose from "mongoose";
|
||||
import { delay } from "../../src/core/helper/delay";
|
||||
import { Result } from "../../src/core/helper/result";
|
||||
import { TypedEvent } from "../../src/core/helper/typed_event.js";
|
||||
import { TypedEvent } from "../../src/core/helper/typed_event";
|
||||
|
||||
|
||||
export const before = async () =>{
|
||||
await mongoose.connection.dropDatabase()
|
||||
}
|
||||
|
||||
export class TestCore {
|
||||
allTests = 0;
|
||||
|
@ -23,7 +29,7 @@ export class TestCore {
|
|||
console.log("\x1b[31m", "❌ - " + testName);
|
||||
};
|
||||
|
||||
testResult = () => {
|
||||
testResult = async () => {
|
||||
console.log("\x1b[32m", "=============");
|
||||
|
||||
if (this.allTests - this.testOk === 0) {
|
||||
|
@ -37,6 +43,7 @@ export class TestCore {
|
|||
console.log("\x1b[31m", "❌ test error:" + String(this.testErr));
|
||||
console.log("\x1b[32m", `✅ test success! ${this.testOk}`);
|
||||
}
|
||||
await before()
|
||||
};
|
||||
resultTest = async (
|
||||
eventClass: TypedEvent<Result<any, any>> | any,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue