Closed markedmondson closed 5 years ago
This changeset breaks two karma tests on the baseAPI.js file (test/baseAPI.spec.js). Although they break because we used dummy test function names that include spaces in them, it is a broken test.
These tests breaking is a good reminder that we should be adding automated tests for pull requests. I will look into that.
I would also like to see at least one test added for this feature. It could probably be done by changing the setup function of the processListeners tests, for example api.on(anyFunctionName + " " + anyOtherFunctionName, callbacks[0]);
, and changing a further test to use callbacks[0] instead of callbacks[3].
Oh I totally didn't see the tests, sorry! An automated suite would definitely be useful. Anything I can do to help?
Automated tests are now in place. The next commit / pull request will have Travis CI running. There is unfortunately no way to run the suite on the pull request as it stands right now.
In your development environment, you can install the necessary components by running npm install
, and then you can run the tests using npm test
. There is also grunt karma:dev
available to watch files for changes and automatically re-run the test suite.
Your next commit should trigger a build with Travis CI.
@markedmondson are you planning on building the suggested tests? I think this would be a good feature to add in
Thanks for the reminder. Yes, I'll give it a shot!
Tests changed here: 77eeb47
First time using Karma so feedback welcome, and matching someone else's test patterns is always tricky!
Adding the contribution instructions for running the tests to the README would be useful too.
Allow adding of multiple listeners at once, like:
(Thanks a million for the API)