Skip to content

Commit 9a40317

Browse files
committed
test(service-analytics): type the envelope test's service config instead of casting it away
Claude-Session: https://claude.ai/code/session_01Evb5jFDZGKQE9KG4jbMfMF Co-authored-by: Claude <noreply@anthropic.com>
1 parent 920ee26 commit 9a40317

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎packages/services/service-analytics/src/__tests__/objectql-read-scope-refusal-envelope.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ import type { AnalyticsQuery } from '@objectstack/spec/contracts';
6666
import type { FilterCondition } from '@objectstack/spec/data';
6767
import { DatasetSchema } from '@objectstack/spec/ui';
6868

69-
import { AnalyticsService } from '../analytics-service.js';
69+
import { AnalyticsService, type AnalyticsServiceConfig } from '../analytics-service.js';
7070
import { compileDataset } from '../dataset-compiler.js';
7171

7272
const BASE = 'deal';
@@ -232,7 +232,7 @@ describe('[#19995] ObjectQL execute face — a read scope the engine refuses is
232232
engine.registerObject({ name: REF, label: 'Account', fields: REF_FIELDS } as never);
233233

234234
const compiled = compileDataset(dataset);
235-
service = new AnalyticsService({
235+
const config: AnalyticsServiceConfig = {
236236
cubes: [compiled.cube],
237237
logger: quiet,
238238
// ObjectQL only — the face `compileScopedFilterToSql` never sees.
@@ -255,7 +255,8 @@ describe('[#19995] ObjectQL execute face — a read scope the engine refuses is
255255
timezone: options.timezone,
256256
context: options.context,
257257
} as never)) as Record<string, unknown>[],
258-
} as never);
258+
};
259+
service = new AnalyticsService(config);
259260
});
260261

261262
afterAll(async () => {

0 commit comments

Comments
 (0)