abstract-state-router icon indicating copy to clipboard operation
abstract-state-router copied to clipboard

test: resolve redirect reloads parent

Open saibotsivad opened this issue 3 years ago • 2 comments

Based on a conversation in the Discord chat, I thought it might be helpful to document (via tests) some specific redirect behavior.

saibotsivad avatar Feb 09 '22 19:02 saibotsivad

The second test that I added, I believe it should be passing as-is.

If I added a console log at the top of each resolve, like console.log(resolvedCount, stateName, params) then I would expect output like this:

0, app, {}
// first redirect to app.child
1, app, {}
2, app.child, {}
// second redirect to app.child.node with params
3, app, { anyKey: 'yes' }
4, app.child, { anyKey: 'yes' }
5, app.child.node, { anyKey: 'yes' }

But the actual output when I run it is like this:

0, app, {}
// first redirect to app.child
1, app, {}
2, app.child, {}

So it runs the resolve for app.child but doesn't finish redirecting to the app.child.node resolve, which I believe is incorrect behaviour.

saibotsivad avatar Feb 09 '22 22:02 saibotsivad