Revert "一回一回sync→dropしてるのをやめてみる"

This reverts commit a9e543ba2e.
This commit is contained in:
rinsuki 2019-10-25 20:36:17 +09:00
parent e0d4353d98
commit 89a267eb22
1 changed files with 10 additions and 2 deletions

View File

@ -21,19 +21,26 @@ import { initDb } from '../src/db/postgre';
import TestChart from '../src/services/chart/charts/classes/test';
import TestGroupedChart from '../src/services/chart/charts/classes/test-grouped';
import TestUniqueChart from '../src/services/chart/charts/classes/test-unique';
import { Connection } from 'typeorm';
describe('Chart', () => {
let testChart: any;
let testGroupedChart: any;
let testUniqueChart: any;
let clock: lolex.InstalledClock<lolex.Clock>;
let connection: Connection;
before(done => {
initDb(true).then(c => {
connection = c;
done();
});
});
after(done => {
connection.close().then(done);
});
beforeEach(done => {
testChart = new TestChart();
testGroupedChart = new TestGroupedChart();
@ -42,12 +49,13 @@ describe('Chart', () => {
clock = lolex.install({
now: new Date('2000-01-01 00:00:00')
});
done();
connection.synchronize().then(done);
});
afterEach(done => {
clock.uninstall();
done();
connection.dropDatabase().then(done);
});
it('Can updates', async(async () => {