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

Add integration tests #1675

Merged
merged 1 commit into from
May 5, 2015
Merged

Add integration tests #1675

merged 1 commit into from
May 5, 2015

Conversation

danielstjules
Copy link
Contributor

Quite a few tests (acceptance, regression, etc) require either manual invocation or visual confirmation after running the test suite to confirm their success or failure. This PR updates some of those to use a helper that invokes mocha and verifies its output. Parts were extracted/modified from #1618

Edit: For clarification. This mostly deals with test files that previously were never ran (had to be manually done), or which required close watch of the test results and console output, as their failure wouldn't trigger a failing build.

// before(function(done) {
// throw new Error('this hook should not be displayed');
// });

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a bug here. Will open a new issue for this.

@danielstjules
Copy link
Contributor Author

@mochajs/mocha :) Should help with CI.

@a8m
Copy link
Contributor

a8m commented Apr 30, 2015

Wow, this is huge(and looks pretty good actually).
I'll look it deeply this weekend. (I think I'll need coffee next to me, a big one. haha 😄)

@dasilvacontin
Copy link
Contributor

And popcorn. 🎉

@danielstjules
Copy link
Contributor Author

ping :)

* @param {function} fn
*/
runMochaJSON: function(fixturePath, args, fn) {
var path, args, output, mocha, listener;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • output, mocha, listener are unused
  • duplicate declaration of args

@a8m
Copy link
Contributor

a8m commented May 4, 2015

LGTM!
Great work @danielstjules. I really like it.
Thx.

sleep(2);
done();
});

function sleep(ms){
function sleep(ms) {
var start = Date.now();
while(start + ms > Date.now())continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This continue is unnecessary here(because this loop doesn't have a body)

@danielstjules
Copy link
Contributor Author

Done! I was thinking I'd merge this evening unless someone else has some recommendations.

cc @mochajs/owners

danielstjules added a commit that referenced this pull request May 5, 2015
@danielstjules danielstjules merged commit 6cc2fdb into mochajs:master May 5, 2015
@danielstjules danielstjules deleted the integration-tests branch May 5, 2015 01:18
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.

3 participants