Skip to content

Commit 8d02cf1

Browse files
committed
fix test
1 parent ef72174 commit 8d02cf1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/cubejs-schema-compiler/test/integration/postgres/sql-generation.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,6 +2266,10 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
22662266
await compiler.compile();
22672267

22682268
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2269+
timeDimensions: [{
2270+
dimension: 'visitors.created_at',
2271+
granularity: 'day'
2272+
}],
22692273
segments: [
22702274
{
22712275
// eslint-disable-next-line no-new-func
@@ -2289,8 +2293,9 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
22892293

22902294
const res = await testWithPreAggregation(preAggregationsDescription, query);
22912295
expect(res).toEqual(
2292-
// Empty result set, only segments in query
2293-
[{}]
2296+
[{
2297+
visitors__created_at_day: '2017-01-02T00:00:00.000Z',
2298+
}]
22942299
);
22952300
});
22962301

0 commit comments

Comments
 (0)