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.

How to use app.stub.ts

See original GitHub issue

Hey lathonez, thx for this sample project. It’s cute & really helpful. What I don’t know is how to use app.stub.ts .

I know it is a stub for the @App decorator, but I don’t know how to test decorators. Could u pls give me a little prompt? thx~

The reason why I want to test decorators is I want to get a full coverage report 100% :)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
lathonezcommented, Jun 27, 2016

Hey,

Can you check the following:

Next steps:

  • Try replacing an inline template in app.ts with an html file
  • test this repo to see you have the same error
0reactions
lathonezcommented, Jun 28, 2016

I usually get to the bottom of these issues by debugging in Chrome. e.g. you need to work out why your querySelectorAll('ion-item') isn’t returning anything. I’d try inspecting the children of nativeElement, it may not be what you think it is.

If you need any further help please raise a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing Angular Components with Stub Services and Spies in ...
Scenario: We'll be creating a component named students.component.ts. This component will handle below activities: Get the list of students from a service.
Read more >
Best Practices for Spies, Stubs and Mocks in Sinon.js
When you use spies, stubs or mocks, wrap your test function in sinon.test . This allows you to use Sinon's automatic clean-up functionality....
Read more >
How to stub express middleware using sinon in typescript?
I've tried to import app after mocking authMiddleware using dynamic imports of typescript but it didn't work also. authMiddleware.ts. import { ...
Read more >
Stubs - Sinon.JS
Use a stub when you want to: Control a method's behavior from a test to force the code down a specific path. Examples...
Read more >
Unit Testing in Angular: Stubs vs Spies vs Mocks - Amadou Sall
To summarize this section, I will say that mocks and spies insist on behavior (which methods were called and how?) while stubs put...
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