How to unit test models, views and routes?
See original GitHub issueDusting off #216 I wondered if there was any progress on it but also how are people going about testing their models, views and routes? Some documented guides would be nice and actually the Yeoman Generator should scaffold tests with the appropriate keystone helpers.
I am especially interesting in testing the models
and views
.
Have any of you written any keystone-helpers
for testing?
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Testing Routes and Controllers | The Odin Project
Unit Testing is important for many reasons that we probably don't need to cover right now. ... Use the supertest module to test...
Read more >Unit Testing Routes
It tests that the route exists in the route table as you intended AND it confirms that a Controller and Action method exist...
Read more >Testing Routes - Ember Guides
Testing routes can be done both via integration or unit tests. Integration tests will likely provide better coverage for routes because routes are...
Read more >21 - Unit Testing Routing | Angular | Karma | Jasmine - YouTube
Angular unit testing for Routing is a interesting topic and RouterTestingModule is used for unit testing the routes.
Read more >EP 13.13 - Angular / Unit Testing / Routing - YouTube
EP 13.13 - Angular / Unit Testing / Routing ... 24K views 3 years ago ... We can test routing in Angular by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s how I’m testing routes in the
universal-keystone-boilerplate
:From there, it’s easy to run assertions against the response body. We should also add cross-browser testing with something like Sauce Labs, but some minimal route testing is a good first step.
@webteckie has done a ton of work on this, so I’ll close this for now as we don’t need the issue to remind us to do it. 👍