angular-express-seed icon indicating copy to clipboard operation
angular-express-seed copied to clipboard

How about some testing love

Open daneroo opened this issue 13 years ago • 8 comments

Just learning angular - through yeoman, would love to help make this seed more like that:

  • Testing with testacular
  • Minification/concatenation from the connect/express directly
  • liveReload

If we can discuss the path forward, I'd love to help... Maybe it would be best to add to the yeoman angular generators directly ??

daneroo avatar Nov 06 '12 16:11 daneroo

:+1: This has been on my radar for a while. No promises on when, but this will happen!

btford avatar Nov 12 '12 21:11 btford

If you'd like to spread out the work, I'd love to help.

daneroo avatar Nov 12 '12 23:11 daneroo

Be my guest! I haven't decided exactly how this should be implemented, but I want to run unit tests on both the front and back end, as well as integration tests.

I definitely want to use Testacular to test the client. I'm thinking maybe Mocha to run tests on the server, but I'm open to suggestions. I'd like to have one ./run-tests script that runs and reports results from all of the tests whenever project files are changed.

btford avatar Nov 13 '12 18:11 btford

IMO, testem with qunit is a convenient choice an example: http://jsfiddle.net/boneskull/mGyHt/

myguidingstar-zz avatar Dec 03 '12 07:12 myguidingstar-zz

+1, especially with Testactular and Mocha!

Siyfion avatar Jan 31 '13 12:01 Siyfion

I'd be curious as to how mocha testing would look. Any eta on when it will come?

yoshuawuyts avatar Feb 26 '13 12:02 yoshuawuyts

+1, would love for it to use Grunt! http://gruntjs.com/

ConceitedCode avatar May 05 '13 21:05 ConceitedCode

I created this simple bower package that can be used as a drop in replacement to mock this library for unit testing.

E2E testing would require something a bit different.

https://github.com/nullivex/angular-socket.io-mock

I would be welcome to any suggestions in the docs to address some of what everyone is asking for here.

Currently my testing setup looks like this:

  • Karma - test runner
  • Mocha - test framework
  • ChaiJS - assertion library
  • RequireJS - environment loader

My boilerplate that achieves this can be found here: https://github.com/nullivex/ragetweet

@btford Maybe something similar to that could be used for the seed to test with. I guess it would take some modification to work without RequireJS but other than that its working well for us so far.

nullivex avatar Nov 12 '13 22:11 nullivex