Skip to content

Commit 1c9d33c

Browse files
committed
test(rest): pay the objectql load at collection in the record-lock route test (#35795)
check:test-source-alias: the new batch cases reach the server's lazy objectql import inside a clocked window; load it at module top like the sibling approvals route tests. Claude-Session: https://claude.ai/code/session_01L6bhgXSK9qt8je9QbZvhKb Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6458913 commit 1c9d33c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎packages/rest/src/rest-approvals-record-lock-route.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ import { RestServer } from './rest-server.js';
2424
import { APPROVAL_RECORD_LOCK_PARAMS, APPROVAL_RECORD_LOCKS_PARAMS } from './approvals-routes.js';
2525
import { APPROVAL_RECORD_LOCKS_MAX_RECORD_IDS } from '@objectstack/spec/contracts';
2626
import { unknownQueryParamMessage } from './query-allowlist.js';
27+
// The rest server's routes load `@objectstack/objectql` lazily, inside a
28+
// handler; paying that load here, at collection, keeps it out of the first
29+
// case's `testTimeout` window (check:test-source-alias).
30+
import '@objectstack/objectql';
2731

2832
const LOCK = '/api/v1/approvals/records/:object/:recordId/lock';
2933
const CALLER = { userId: 'u_reader', positions: [], permissions: [] };

0 commit comments

Comments
 (0)