(count: number, limit = FOOTER_MENU_ROWS)
| 3 | import { FOOTER_MENU_ROWS, createFooterMenuState } from "@/cli/cmd/run/footer.menu" |
| 4 | |
| 5 | function mount(count: number, limit = FOOTER_MENU_ROWS) { |
| 6 | let dispose!: () => void |
| 7 | let menu!: ReturnType<typeof createFooterMenuState> |
| 8 | |
| 9 | createRoot((nextDispose) => { |
| 10 | dispose = nextDispose |
| 11 | menu = createFooterMenuState({ count: () => count, limit }) |
| 12 | return null |
| 13 | }) |
| 14 | |
| 15 | return { menu, dispose } |
| 16 | } |
| 17 | |
| 18 | test("footer menu scrolls before the selected row hits the bottom edge", () => { |
| 19 | const state = mount(20) |
no test coverage detected