Skip to content

Commit dce4a7e

Browse files
committed
test(rest): no console spy in the dropStorage pin (check:rest-log-spy-declared)
Claude-Session: https://claude.ai/code/session_0121ooBYRmS8ziFXm9ai5YHm Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9534b10 commit dce4a7e

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

‎packages/rest/src/meta-delete-drop-storage-other-rows.test.ts‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* the store and the table to show the refused delete changed nothing.
3636
*/
3737

38-
import { describe, it, expect, afterEach, vi } from 'vitest';
38+
import { describe, it, expect, afterEach } from 'vitest';
3939
import { ObjectQL } from '@objectstack/objectql';
4040
import { SqlDriver } from '@objectstack/driver-sql';
4141
import { ObjectStackProtocolImplementation } from '@objectstack/metadata-protocol';
@@ -169,13 +169,8 @@ async function twoPackageObject(environmentId?: string) {
169169
const h = await boot(environmentId);
170170
// The registry holds one owner per object name, so the second package's
171171
// write-through is refused (and logged) at save time; the row is stored.
172-
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
173-
try {
174-
ok(await h.save(P));
175-
ok(await h.save(Q));
176-
} finally {
177-
warn.mockRestore();
178-
}
172+
ok(await h.save(P));
173+
ok(await h.save(Q));
179174
await h.insertRecord('kept');
180175
expect(await h.storedPackages()).toEqual([P, Q]);
181176
expect(await h.hasTable()).toBe(true);

0 commit comments

Comments
 (0)