Skip to content

Commit e628a11

Browse files
committed
some improvements in tests
1 parent 7dc6919 commit e628a11

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/cubejs-query-orchestrator/test/unit/PreAggregations.test.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable global-require */
22
/* globals describe, jest, beforeEach, test, expect */
33
import R from 'ramda';
4-
import { PreAggregationPartitionRangeLoader } from '../../src';
4+
import { PreAggregationPartitionRangeLoader, PreAggregations } from '../../src';
55

66
class MockDriver {
77
constructor() {
@@ -139,7 +139,6 @@ describe('PreAggregations', () => {
139139
let preAggregations = null;
140140

141141
beforeEach(async () => {
142-
const { PreAggregations } = require('../../src/orchestrator/PreAggregations');
143142
preAggregations = new PreAggregations(
144143
'TEST',
145144
mockDriverFactory,
@@ -167,7 +166,6 @@ describe('PreAggregations', () => {
167166
let preAggregations = null;
168167

169168
beforeEach(async () => {
170-
const { PreAggregations } = require('../../src/orchestrator/PreAggregations');
171169
preAggregations = new PreAggregations(
172170
'TEST',
173171
mockDriverFactory,
@@ -195,7 +193,6 @@ describe('PreAggregations', () => {
195193
let preAggregations = null;
196194

197195
beforeEach(async () => {
198-
const { PreAggregations } = require('../../src/orchestrator/PreAggregations');
199196
preAggregations = new PreAggregations(
200197
'TEST',
201198
mockDriverReadOnlyFactory,
@@ -223,7 +220,6 @@ describe('PreAggregations', () => {
223220
let preAggregations = null;
224221

225222
beforeEach(async () => {
226-
const { PreAggregations } = require('../../src/orchestrator/PreAggregations');
227223
preAggregations = new PreAggregations(
228224
'TEST',
229225
mockDriverFactory,
@@ -255,7 +251,6 @@ describe('PreAggregations', () => {
255251
let preAggregations = null;
256252

257253
beforeEach(async () => {
258-
const { PreAggregations } = require('../../src/orchestrator/PreAggregations');
259254
preAggregations = new PreAggregations(
260255
'TEST',
261256
() => { throw new Error('The source database factory should never be called when externalRefresh is true, as it will trigger testConnection'); },
@@ -289,7 +284,6 @@ describe('PreAggregations', () => {
289284
let preAggregations = null;
290285

291286
beforeEach(async () => {
292-
const { PreAggregations } = require('../../src/orchestrator/PreAggregations');
293287
preAggregations = new PreAggregations(
294288
'TEST',
295289
mockDriverFactory,
@@ -312,7 +306,6 @@ describe('PreAggregations', () => {
312306
});
313307

314308
test('test for function targetTableName', () => {
315-
const { PreAggregations } = require('../../src/orchestrator/PreAggregations');
316309
let result = PreAggregations.targetTableName({
317310
table_name: 'orders_number_and_count20191101',
318311
content_version: 'kjypcoio',
@@ -342,7 +335,6 @@ describe('PreAggregations', () => {
342335
let preAggregations = null;
343336

344337
beforeEach(async () => {
345-
const { PreAggregations } = require('../../src/orchestrator/PreAggregations');
346338
preAggregations = new PreAggregations(
347339
'TEST',
348340
mockDriverFactory,

0 commit comments

Comments
 (0)