mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
add test for geoip
This commit is contained in:
1 parent
7651b0a697
commit
a8bdfa8f30
7 files changed
+26
-13
No files matched your search
@@ -1,5 +1,4 @@
|
||||
import 'hydrooj/src/utils';
|
||||
|
||||
import 'hydrooj';
|
||||
jest.mock('hydrooj/src/service/db');
|
||||
|
||||
export async function connect() {
|
||||
@@ -13,8 +12,10 @@ export async function connect() {
|
||||
|
||||
export async function dispose() {
|
||||
const db = require('hydrooj/src/service/db');
|
||||
await db.getClient().close();
|
||||
await db.getClient2().close();
|
||||
await db.getDb().close();
|
||||
await db.getDb2().close();
|
||||
await Promise.all([
|
||||
db.getClient().close(),
|
||||
db.getClient2().close(),
|
||||
db.getDb().close(),
|
||||
db.getDb2().close(),
|
||||
]);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'hydrooj';
|
||||
import 'hydrooj/src/utils';
|
||||
import md5 from 'hydrooj/src/lib/md5';
|
||||
import sha1 from 'hydrooj/src/lib/sha1';
|
||||
import pwhash from 'hydrooj/src/lib/hash.hydro';
|
||||
import 'hydrooj/src/utils';
|
||||
|
||||
describe('crypto', () => {
|
||||
const content1 = 'twd2akioi';
|
||||
|
||||
Reference in new issue
Block a user