fix(test): fix chart test

This commit is contained in:
syuilo 2022-09-19 08:25:44 +09:00
parent a2eac9fff6
commit 89174904bc
5 changed files with 18 additions and 16 deletions

View file

@ -14,6 +14,7 @@ import { entity as TestUniqueChartEntity } from '@/core/chart/charts/entities/te
import { entity as TestIntersectionChartEntity } from '@/core/chart/charts/entities/test-intersection.js';
import { loadConfig } from '@/config.js';
import type { AppLockService } from '@/core/AppLockService';
import Logger from '@/logger.js';
describe('Chart', () => {
const config = loadConfig();
@ -57,10 +58,11 @@ describe('Chart', () => {
await db.initialize();
testChart = new TestChart(db, appLockService);
testGroupedChart = new TestGroupedChart(db, appLockService);
testUniqueChart = new TestUniqueChart(db, appLockService);
testIntersectionChart = new TestIntersectionChart(db, appLockService);
const logger = new Logger('chart'); // TODO: モックにする
testChart = new TestChart(db, appLockService, logger);
testGroupedChart = new TestGroupedChart(db, appLockService, logger);
testUniqueChart = new TestUniqueChart(db, appLockService, logger);
testIntersectionChart = new TestIntersectionChart(db, appLockService, logger);
clock = lolex.install({
now: new Date(Date.UTC(2000, 0, 1, 0, 0, 0)),