mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-22 00:28:34 +02:00
feat: productionize paid modes and PvP capture
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const DatabaseManager = require('../src/db/databaseManager');
|
||||
|
||||
describe('DatabaseManager readiness freshness', () => {
|
||||
test('requires both a connection and a recent successful query', () => {
|
||||
const db = new DatabaseManager();
|
||||
expect(db.isHealthy()).toBe(false);
|
||||
|
||||
db.connected = true;
|
||||
db.lastSuccessfulQueryAt = Date.now();
|
||||
expect(db.isHealthy(1000)).toBe(true);
|
||||
|
||||
db.lastSuccessfulQueryAt = Date.now() - 2000;
|
||||
expect(db.isHealthy(1000)).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user