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

Karma test runner #16734

Merged
merged 4 commits into from
Jul 26, 2015
Merged

Karma test runner #16734

merged 4 commits into from
Jul 26, 2015

Conversation

vlazar
Copy link
Collaborator

@vlazar vlazar commented May 8, 2015

Replaces plain Jasmine spec runner with Karma test runner.

Karma test runner is a much more convenient way to run tests. It allows to run tests in multiple browsers locally or in the cloud, shows failures in console, provides debugger, can be used with Continuous Integration server as Travis CI, and so on and so forth.

@vlazar vlazar mentioned this pull request May 8, 2015
vlazar referenced this pull request in juanto121/awesomplete May 8, 2015
@vlazar
Copy link
Collaborator Author

vlazar commented May 14, 2015

Have you had a chance to check it out? It's easy (provided you already have Chrome and node.js installed):

git clone https://github.com/vlazar/awesomplete.git
git checkout features/karma-runner
npm install
npm test

Meanwhile... I'm gradually adding more Jasmine specs and using Karma runner.

Teaser:

Chrome 42.0.2311 (Mac OS X 10.9.5): Executed 64 of 66 (skipped 2) SUCCESS (0.129 secs / 0.103 secs)

That's right, ~0.1 secs to run all the tests. Instant feedback!

@vlazar
Copy link
Collaborator Author

vlazar commented May 19, 2015

@LeaVerou I'm close to having almost full test coverage for Awesomplete in Jasmine soon. After it's done I plan to review tests and do some cleanup before doing PR for review on how easy Jasmine tests are.

Tests are already quite useful. Some bugs were uncovered and I have some ideas about possible API tweaks. Running the whole test suite with Karma sill takes less than 1 second, so it would help a lot in quick and safe bug fixing or refactoring.

LeaVerou added a commit that referenced this pull request Jul 26, 2015
@LeaVerou LeaVerou merged commit 8ddd740 into LeaVerou:gh-pages Jul 26, 2015
@LeaVerou
Copy link
Owner

I have no time to review this properly, but since it's separate and you seem willing to work on it, I’m merging it anyway. Thanks so much!

@vlazar
Copy link
Collaborator Author

vlazar commented Aug 2, 2015

Thanks Lea! Yes, I will definitely continue my work on it.

One way to make it easier for you as well as others is to setup a Travis CI, so that tests will be executed on each pit push and results will be visible on github very quickly (doesn't mean no PR review necessary, but at least changes with test failures are most likely not ready for merge).

Will do a separate PR for Travis CI.

@vlazar
Copy link
Collaborator Author

vlazar commented Aug 2, 2015

@LeaVerou PR for running tests on Travis CI #16753. This way you can get feedback when someone adds tests or changes code.

@vlazar vlazar deleted the features/karma-runner branch January 29, 2016 11:53
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

Successfully merging this pull request may close these issues.

2 participants