question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] 3.26: Router is not setup in a non-application test

See original GitHub issue

🐞 Describe the Bug

Ember 3.24 included a change that meant the router service automatically worked in non-application tests (i.e. no need for this.owner.setupRouter()) - this worked great in 3.25, but seems to have regressed in 3.26.

🔬 Minimal Reproduction

Run the tests in this repo: https://github.com/grayt0r/ember-router-setup-in-tests.

Relevant code changes are here.

😕 Actual Behavior

The router is not setup and the test fails with an error (the exact error depends on which router method the component calls):

Cannot read property 'generate' of undefined

🤔 Expected Behavior

The router is setup, the link is correctly rendered and the test passes.

🌍 Environment

  • Ember: - v3.26.1

➕ Additional Context

The test passes if I downgrade to 3.25.4 or if I add this.owner.setupRouter() to the test setup.

I think it might be related to this change: https://github.com/emberjs/ember.js/pull/19405.

/cc @Ravenstine @rwjblue

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
rwjbluecommented, Apr 12, 2021

Chatted with @Ravenstine about this today, they are going to work on a failing test reproduction first so we can figure out the right way to fix…

1reaction
grayt0rcommented, Sep 6, 2021

@chriskrycho sorry for the delay, but that fix appears to solve our issues, thank you very much! 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSCvs42498 - NAT Alias not created for some ... - Cisco Bug
Symptom: A pair of IOS-XE routers are configured for application redundancy with NAT. When the primary device is failed to the secondary ...
Read more >
Test Your Router - RouterSecurity.org
There are, however, three instances where the firewall tests are not communicating ... The writeup of a bug in some Cisco routers, by...
Read more >
Speed Test Bug in RBKE963 Router UI?
Opened a ticket. Tier 2 not calling me back. WAN Network configuration is as follows: Orbi Router -> WAN port -> CAT 8....
Read more >
No provider for router" while writing Karma-Jasmine unit test ...
After creating the set up and all components, we ran ng test command from cmd inside angular2test folder. The below file is our...
Read more >
How to Fix Internet Connection Problem on ASUS Router?
When you found out your devices (E.g. use a phone, computer, etc. ) which couldn't get Wi-Fi internet access after connecting to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found