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

Proposal: Tests #14565

Closed
vlazar opened this issue Mar 2, 2015 · 12 comments
Closed

Proposal: Tests #14565

vlazar opened this issue Mar 2, 2015 · 12 comments

Comments

@vlazar
Copy link
Collaborator

vlazar commented Mar 2, 2015

Do you have plans to cover code with tests?

It seems reasonable to introduce tests for such a popular project ;)

If you are interested, I'd like to know your preferences in test/mock framework, test runner, etc. Continuous Integration would be also nice to have, as well as versioning and other staff.

But let's just start small. So... tests, YES or NO?

@LeaVerou
Copy link
Owner

LeaVerou commented Mar 3, 2015

Tests would be nice, don’t really have a preferred framework, I didn’t like anything I’ve tried. :/
In general, the simpler and easier for new contributors, the better.

@arthurvr
Copy link
Contributor

arthurvr commented Mar 4, 2015

Sure! 👍

@michaelachrisco
Copy link

Ive used http://qunitjs.com/ in the past. Its pretty straight forward. We could (all)? do some collab sometime. At the very least, it will enable future pull requests to be tested.

@LeaVerou
Copy link
Owner

LeaVerou commented Mar 4, 2015

Oh I forgot to say: I would prefer something as popular as possible, as it increases chances that contributors will already be familiar with it.

@arthurvr
Copy link
Contributor

arthurvr commented Mar 4, 2015

I'm personally +1 to QUnit.

@vlazar
Copy link
Collaborator Author

vlazar commented Mar 5, 2015

@LeaVerou
Copy link
Owner

I haven’t used them extensively, so whatever the majority goes with, I’m fine with it.
Ideally something which makes it super easy for new contributors to set it up and/or write new tests.

michaelachrisco added a commit to michaelachrisco/awesomplete that referenced this issue Mar 20, 2015
juanto121 added a commit to juanto121/awesomplete that referenced this issue Mar 27, 2015
@juanto121
Copy link
Contributor

While trying jasmine framework, which I found to have nicer syntax than qUnit and not to forget its ease of use, wondered into the problem of testing the Awesomplete private functions, are they testable?
I couldnt come up with any way of easily testing them.

juanto121 added a commit to juanto121/awesomplete that referenced this issue Mar 27, 2015
juanto121 added a commit to juanto121/awesomplete that referenced this issue Apr 1, 2015
@vlazar
Copy link
Collaborator Author

vlazar commented May 8, 2015

So test framework is selected. Excellent!

Here is a better way to run tests with Karma test runner #16734
It would be so much easier to do TDD/BDD and we can later run tests on Travis CI.

@juanto121
Copy link
Contributor

There's still discussion about the merged framework #16640. I tried to refactor the code style a bit in feace11 but we should all agree on keeping Jasmine(or changing it) before adding coverage and automation.

@vlazar
Copy link
Collaborator Author

vlazar commented May 10, 2015

Ok, I think it will be easier to say if the tests are easy or not, when you see them.

As I'm more into Jasmine, I've started adding more Jasmine specs based on already merged work and @juanto121 current work in feace11 .
I'm also using Karma test runner from #16734.

@LeaVerou Can you please look at #16734 and decide if you like to use it?

@vlazar
Copy link
Collaborator Author

vlazar commented Nov 25, 2015

Closing this, since we're not only have tests now, but running them on TravisCI with Karma. Also #16785 (hopefully to be merged soon) adds nearly 100% test coverage.

@vlazar vlazar closed this as completed Nov 25, 2015
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

6 participants
@vlazar @LeaVerou @michaelachrisco @juanto121 @arthurvr and others