Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrate testing angular code #20

Open
caseyhoward opened this issue May 29, 2014 · 17 comments
Open

Demonstrate testing angular code #20

caseyhoward opened this issue May 29, 2014 · 17 comments

Comments

@caseyhoward
Copy link

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
Copy link
Contributor

huntc commented May 31, 2014

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.

@huntc huntc closed this as completed May 31, 2014
@diwa-zz
Copy link

diwa-zz commented May 31, 2014

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
Copy link
Contributor

huntc commented May 31, 2014

Ah yes, good point. I'll reopen.

@huntc huntc reopened this May 31, 2014
@huntc
Copy link
Contributor

huntc commented May 31, 2014

PR most welcome :-)

@magro
Copy link
Contributor

magro commented May 31, 2014

+1, I'm also interested in this.

@caseyhoward
Copy link
Author

@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
Copy link

+1, Is anyone working on this?

@huntc
Copy link
Contributor

huntc commented Jun 26, 2014

Not actively. PRs welcomed.

@Magrath
Copy link

Magrath commented Aug 15, 2014

+1

@krimple
Copy link

krimple commented Aug 18, 2014

+1 I am trying to figure this out too.

@jpolo
Copy link

jpolo commented Oct 31, 2014

+1

4 similar comments
@mjswensen
Copy link

+1

@aluanhaddad
Copy link

+1

@pbelmann
Copy link

+1

@idot
Copy link

idot commented Jun 9, 2015

+1

@ilanbiala
Copy link

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

@hwzhao
Copy link

hwzhao commented Oct 6, 2015

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests