Skip to content

Commit 53e09f5

Browse files
committed
test(console): the clipboard mock in the deployment notice test is typed
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cyhB3ePno23ywn1PQd
1 parent b9dfc83 commit 53e09f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎ui/packages/app-shell/src/console/deployment-notice/__tests__/DeploymentNotice.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ describe('DeploymentNotice (objectstack#30120)', () => {
9595
});
9696

9797
it('the copy button hands over every variable, saying which current value to carry over', async () => {
98-
const writeText = vi.fn(async () => {});
98+
const writeText = vi.fn(async (_text: string) => {});
9999
Object.defineProperty(navigator, 'clipboard', { value: { writeText }, configurable: true });
100100
render(<DeploymentNotice placement="home" />);
101101
await settle();
102102
await act(async () => {
103103
fireEvent.click(screen.getByTestId('deployment-notice-copy'));
104104
});
105105
expect(writeText).toHaveBeenCalledTimes(1);
106-
const text = writeText.mock.calls[0]![0] as string;
106+
const text = writeText.mock.calls[0]![0];
107107
expect(text).toMatch(/^OS_DATABASE_URL=$/m);
108108
expect(text).toMatch(/^OS_AUTH_SECRET=$/m);
109109
expect(text).toMatch(/^OS_SECRET_KEY=$/m);

0 commit comments

Comments
 (0)