Skip to content

Commit 522c33d

Browse files
committed
test(ui): type the References-columns fixture without a rest spread (#25916)
Claude-Session: https://claude.ai/code/session_01C6T942afhqAP5w9XBmfTDC Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7f325cf commit 522c33d

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.referencesColumns-25916.test.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ const LAYERED = {
3333
resettable: true,
3434
};
3535

36-
const referencesImpl = {
37-
current: vi.fn(async () => [{ fromType: 'view', fromName: 'all_accounts', path: 'data.object' }]),
38-
};
36+
/** One reference, so the sheet draws its table. */
37+
const REFERENCE = { fromType: 'view', fromName: 'all_accounts', path: 'data.object' };
3938

4039
const mockClient = {
4140
list: vi.fn(async () => []),
@@ -44,7 +43,7 @@ const mockClient = {
4443
getDraft: vi.fn(async () => null),
4544
layered: vi.fn(async () => LAYERED),
4645
reset: vi.fn(async () => ({ success: true })),
47-
references: vi.fn(async (...args: unknown[]) => referencesImpl.current(...args)),
46+
references: vi.fn(async () => [REFERENCE]),
4847
};
4948

5049
vi.mock('./useMetadata', async (importOriginal) => {

0 commit comments

Comments
 (0)