Skip to content

Commit 90c78f0

Browse files
committed
test(metadata, metadata-protocol): type the console.warn spies the #29596 pins read
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZWEwRacLdvKTeMCb2
1 parent de3bb7a commit 90c78f0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/metadata-protocol/src/protocol-stored-item-conversion.notice-name.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const staleExtension = (target: string) => ({
3131
fields: { opens_at__c: { type: 'time', label: 'Opens', defaultValue: '12:00Z' } },
3232
});
3333

34-
let warn: ReturnType<typeof vi.spyOn>;
34+
let warn: { mock: { calls: unknown[][] }; mockRestore(): void };
3535
beforeEach(() => {
3636
warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
3737
});

‎packages/metadata/src/loaders/database-loader.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ describe('DatabaseLoader', () => {
382382
// each stale extension and keys the warn-once set by it. Measured on a real
383383
// store: the two rows read here as `crm_account` and `crm_contact`.
384384
describe('stored conversion notice names the row (#29596)', () => {
385-
const subjects = (warn: ReturnType<typeof vi.spyOn>) => warn.mock.calls
385+
const subjects = (warn: { mock: { calls: unknown[][] } }) => warn.mock.calls
386386
.map((c) => String(c[0]))
387387
.filter((line) => line.includes('carries a pre-protocol shape'))
388388
.map((line) => /stored (\S+) carries/.exec(line)?.[1]);

0 commit comments

Comments
 (0)