solidjs/testing-library using `location` but still getting <Router /> error
Hey,
I am currently trying to setup on of my solid-apps with solidjs/testing-library. I want to test something on my main route, and am therefore using the
location
location
option. However my test still throws the
Make sure your app is wrapped in a <Router />
Make sure your app is wrapped in a <Router />
-error. Any idea what I could be doing wrong?
Here's my test wip test case:
it('should run on toggle start', async () => { // Arrange // TODO: // fill store with a time entry const screen = render(() => <App />, { location: '/' }) setIsHydrating(false) // Act // TODO: // press play on the time entry with the respective id // move time forward const currentTimerStartButton = await screen.findByRole('button', { name: 'start-current-timer' }) fireEvent.click(currentTimerStartButton) // Assert // TODO: // assert that current timer displays correct time entry expect(true).toBe(true) })
it('should run on toggle start', async () => { // Arrange // TODO: // fill store with a time entry const screen = render(() => <App />, { location: '/' }) setIsHydrating(false) // Act // TODO: // press play on the time entry with the respective id // move time forward const currentTimerStartButton = await screen.findByRole('button', { name: 'start-current-timer' }) fireEvent.click(currentTimerStartButton) // Assert // TODO: // assert that current timer displays correct time entry expect(true).toBe(true) })