MCPcopy Create free account
hub / github.com/dailydotdev/apps / scrollTo

Function scrollTo

packages/shared/src/components/shell/ShellBlock.spec.tsx:41–44  ·  view source on GitHub ↗
(y: number)

Source from the content-addressed store, hash-verified

39} as LoggedUser;
40
41const scrollTo = (y: number) => {
42 Object.defineProperty(window, 'scrollY', { configurable: true, value: y });
43 window.dispatchEvent(new Event('scroll'));
44};
45
46const renderBlock = (ui: React.ReactElement, pathname = '/') => {
47 jest.mocked(useRouter).mockReturnValue({

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected