Conversation
✅ Deploy Preview for routify-v3-example canceled.
|
|
Thank you so much for this. |
|
No problem - I've no idea if this will work in CI, but it's a starting point for me to try and figure out why the module replacement doesn't seem to be working for me. I'd be keen to help get these tests into a useful shape though so if you think this could be something we eventually want to merge I'd be happy to make any required changes. |
|
Thanks again for the PR. I'm thinking this should probably be an integration test rather than E2E. I don't know if this is something you want to try. If not, I'll be happy to do it. Also, are you on Discord by any chance? |
|
I'd be happy enough to try - would that belong in I'm not on discord. |
|
I think the best place would be You would have to do something like const { default: routes } = await import('./temp/routes.default.js')
const instance = new RoutifyRuntime({ routes })
const router = instance.routers[0]
await router.url.push('/some/route')
const route = router.activeRoute.get()
// run tests on route.fragments. Each fragment contains a node with a component to be rendered. Eg. a `reset` would have fewer fragments than a `prepend`
assert.equal(route.fragments.map(fragment => fragment.node.name), [/*names of nodes to be rendered*/])But really. You should only do this for your enjoyment since I expect you might hit some obstacles due to the lack of documentation for R3s internal code. |
test with