4 ms·
One of the best starting points for building a SPA that I've seen is the Angular Fullstack generator https://github.com/DaftMonk/generator-angular-fullstack htt
by chrisco255 11y ago
One of the best starting points for building a SPA that I've seen is the Angular Fullstack generator https://github.com/DaftMonk/generator-angular-fullstack https://github.com/DaftMonk/generator-angular-fullstack
This generator uses Angular best practices, has Jasmine and Karma built in for solid unit and integration (called e2e tests in Angular) testing. The built-in generators even build pages, controllers, and add the unit test files along with the new routes. In addition, authentication via Passport.js is in the box. In my opinion it's an easy to extend, robust solution for building a non-trivial SPA. Even has hooks for easy deployment to Heroku.
That being said, I have been trying to learn React lately and have yet to find a similar thing for a React-based stack.
- edwinnathaniel 11y agoCan you briefly expand the e2e test aspect of Angular? I'm looking to learn ways to do e2e test without touching the DOM (e.g.: from Controller all the way up to the back-end; imagine firing up Chrome DevTools console and start writing JS code that executes some logic and eventually fires AJAX request and process the response, of course in this case the View will be mocked but the app logic and everything else can be executed).
- chrisco255 11y agoCheckout Angular's guide on e2e testing using https://docs.angularjs.org/guide/e2e-testing https://docs.angularjs.org/guide/e2e-testing Also read about Protractor, http://angular.github.io/protractor/#/ http://angular.github.io/protractor/#/, their e2e testing framework. These tests generally should be run in the browser. You can run them in PhantomJS, a command line browser simulator, but it's not the same and there are sometimes issues that don't get caught by Phantom. Best to run those tests in an actual browser.
- edwinnathaniel 11y agoI went over those pages briefly and I wish it's not Selenium-like but it kinda is... :(