typesafehub / angular-seed-play

initial
Other
118 stars 43 forks source link

Demonstrate testing angular code #20

Open caseyhoward opened 10 years ago

caseyhoward commented 10 years ago

This is a good app for showing how to use angular with play, however, it's missing how to actually test using requirejs and mocha.

huntc commented 10 years ago

Thanks. The main objective of this project was to take the angular-seed project and apply a minimal amount of changes. We've probably digressed from this a little. I'm going to close this, but we welcome a PR in this regard. Thanks again.

diwa-zz commented 10 years ago

But angular-seed has test code.

We would definitely like to see a test example. Angular has its own test runner (karma) and it would be interesting to see how sbt-mocha can replace it.

The only other example of testing with sbt-mocha is with reactive-map but things are quite different for angular.

huntc commented 10 years ago

Ah yes, good point. I'll reopen.

huntc commented 10 years ago

PR most welcome :-)

magro commented 10 years ago

+1, I'm also interested in this.

caseyhoward commented 10 years ago

@diwa It does have test code that uses karma, but I wanted to see an sbt-mocha example like you mentioned. Currently we use the karma runner (with grunt) to test our Javascript. We want to be able to use sbt for our javascript build also, but have had no luck.

We tried a requirejs and mocha combination but it didn't work. It basically came down to us needing a dom. We tried using jsdom but that didn't work because we couldn't shim angular in a node environment. We also considered using sbt-webdriver, but it doesn't appear to have mocha support (see sbt/sbt-web#29).

We eventually ended up just sticking with our grunt build for the time being.

I would love to submit a PR but the only reason I opened this was because I don't know how to use sbt-mocha with angular. ;)

poenneby commented 10 years ago

+1, Is anyone working on this?

huntc commented 10 years ago

Not actively. PRs welcomed.

Magrath commented 10 years ago

+1

krimple commented 10 years ago

+1 I am trying to figure this out too.

jpolo commented 10 years ago

+1

mjswensen commented 9 years ago

+1

aluanhaddad commented 9 years ago

+1

pbelmann commented 9 years ago

+1

idot commented 9 years ago

+1

ilanbiala commented 9 years ago

+1 tests are pretty important, 1 example is really crucial.

hwzhao commented 9 years ago

+1