Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4838

To stub or not to stub the router service in integration tests

$
0
0

@bartocc wrote:

Let’s imagine a component uses the router service currentRouteName property to decide what to display in its template.

To tests this, I would write an integration test where I would stub the router service and provide it with a dummy currentRouteName value.

But in a recent comment on a related topic https://github.com/ember-cli/ember-cli-qunit/issues/203#issuecomment-506735392, @rwjblue suggested that we should not stub the router service.

If we don’t stub the router service, then what is the right way to write this integration test?

Thx for the insight

Ju

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4838

Trending Articles