Merge branch 'develop' into mkjs-n

This commit is contained in:
tamaina 2023-05-29 13:02:41 +00:00
commit d647df7f63
116 changed files with 2386 additions and 1892 deletions

View file

@ -52,11 +52,7 @@ export class MockResolver extends Resolver {
const r = this._rs.get(value);
if (!r) {
throw {
name: 'StatusError',
statusCode: 404,
message: 'Not registed for mock',
};
throw new Error('Not registed for mock');
}
const object = JSON.parse(r.content);

View file

@ -482,7 +482,7 @@ export async function testPaginationConsistency<Entity extends { id: string, cre
}
export async function initTestDb(justBorrow = false, initEntities?: any[]) {
if (process.env.NODE_ENV !== 'test') throw 'NODE_ENV is not a test';
if (process.env.NODE_ENV !== 'test') throw new Error('NODE_ENV is not a test');
const db = new DataSource({
type: 'postgres',