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

feat(gen): unify testing framework #585

Merged

Conversation

kingcody
Copy link
Member

Changes:

  • add prompt for Jasmine or Mocha
  • if Mocha choosen, prompt for Expect or Should
  • use <%= does() %> to dynamically insert assertions (expect|should)
  • add mocha variants for protractor tests
  • add mocha options to protractor.conf
  • remove test/fixtures/(bower|package).json from repo
  • move runE2E functionality to runTest and simplify switch
  • comment generator test functions

Note:
Server-side jasmine test are needed to fully unify testing frameworks.
Once Jasmine tests are included for server, mocha dep can be removed
fully when selecting Jasmine.

@kingcody
Copy link
Member Author

@JaKXz, I know you don't have a lot of extra time, but I could use some server side Jasmine tests to match the ones written in Mocha. Even a 'call' for tests would help, especially coming from a 'collaborator'.

I need to adjust timeouts for protractor/mocha, but other than that; this PR simply lacks server side Jasmine tests.

My main issue is the differences in flow control such as before, beforeEach, after, afterEach. I'm not sure how to structure the before clauses in Jasmine. Also I'm pretty busy with several client's ATM, but I'll try to do what I can. Just wondering if I might be able to get some help on this one. Thanks.

@kingcody kingcody force-pushed the feature/unify-testing-frameworks branch from 572bf3d to 15be023 Compare September 25, 2014 09:43
@JaKXz
Copy link
Collaborator

JaKXz commented Sep 25, 2014

@kingcody I hear you, committing to get you a PR on your feature branch soon.

Those who are familiar with Jasmine, please feel free to contribute as well.

@DaftMonk
Copy link
Member

Updated the travis config so e2e tests should run on pull requests now. You'll need to merge canary back into your branch.

Edit: actually I spoke to soon, need to work on this a bit more to get it working for pull requests

@kingcody
Copy link
Member Author

My apologies, I should have mentioned the build issue is a WIP. I'm currently working on an issue with karma and url.parse. Also, the last e2e test set that uses jasmine and no server ops is failing in an odd way, perhaps it might be clearer to you?

@DaftMonk
Copy link
Member

@kingcody Ok I just had to fix the credentials for sauce labs in the .travis.yml. Travis wasn't building pull requests with sauce labs, for running the protractor tests. Not sure why only one set of e2e tests was failing though, they all should have failed.

@kingcody
Copy link
Member Author

Odd indeed; I'll rebase and test when I get back to my computer. Do you have a preference on handling the node 0.11.14+ issue with the build process? I was going to specify 0.11.13 in travis.yml for the time being and continue to work on the url.parse issue and follow the karma issue thread.

@DaftMonk
Copy link
Member

I'm totally fine with specifying 0.11.13 until that issue is fixed.

@kingcody
Copy link
Member Author

Sounds great, I'll try to get this patched up tonight.

Side note: Once the issues are sorted out this PR will work without Jasmine server test. I tried to set it up nicely to be able to drop them in and adjust the dependency conditionals. It's up to you if you'd like to go ahead and merge or wait for the jasmine tests. I'm perfectly content either way.

Changes:
- add prompt for Jasmine or Mocha
- if Mocha choosen, prompt for Expect or Should
- use `<%= does() %>` to dynamically insert assertions (expect|should)
- add mocha variants for protractor tests
- add mocha options to protractor.conf
- remove `test/fixtures/(bower|package).json` from repo
- move runE2E functionality to runTest and simplify switch
- comment generator test functions
- use node `0.11.13` in travis due to issues with `0.11.14`+

Note:
Server-side jasmine test are needed to fully unify testing frameworks.
Once Jasmine tests are included for server, mocha dep can be removed
fully when selecting Jasmine.
@kingcody kingcody force-pushed the feature/unify-testing-frameworks branch from 15be023 to 654de87 Compare September 26, 2014 09:32
@kingcody
Copy link
Member Author

Not sure whats up with the sauce labs tunnel connection on this build, but everything works fine on my Travis build, same commit hash...

DaftMonk added a commit that referenced this pull request Sep 27, 2014
@DaftMonk DaftMonk merged commit effef8d into angular-fullstack:canary Sep 27, 2014
@kingcody kingcody deleted the feature/unify-testing-frameworks branch July 8, 2015 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants