Skip to content

Testing with new Solid Router. #335

Description

@phungleson

Describe the bug

There are 2 related questions regarding using Solid Router in test.

  1. With the old Solid Router, I can do something like this.
<Router source={source}>...</Router>

Where I can pass in source to test different pages.

With the new Solid Router, I wasn't be able to do something similar, even though I tried to use url

<Router url={url}>...</Router>

Router doesn't pick up url, but rather only take the url from the address bar.

  1. I used to pass source as LocationChangeSignal, and assert the changes of the location. I don't know how to do it with the new version, since docs is quite limited.

Cheers,

Your Example Website or App

I tried to put some code into playground but somehow cannot add @solidjs/router as dependency.

Steps to Reproduce the Bug or Issue

N/A

Expected behavior

N/A

Screenshots or Videos

No response

Platform

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions