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

Fork #111

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Fork #111

wants to merge 8 commits into from

Conversation

mageddo
Copy link

@mageddo mageddo commented Dec 27, 2015

Main difference

On original grunt-mocha-test if you have a mocha test that use console.log and configuration like that

mochaTest: {
  'coverage': {
    options: {
      reporter: 'html-cov',
      quiet: true,
      captureFile: 'unit-tests.html',
    },
    src: ['test.js']
  },
}

the test

describe('grunt-mocha-test', function() {
  it('should return 1', function(done) {
    console.log('It will out on report file');
    done();
  });
});

In this case the console output will be reported on report file, this fork fix it. To it work the reporter need to write on the runner.on('end') event

@pghalliday
Copy link
Owner

Haven't had a chance to check this out and see what's happening but did you notice that all the tests are failing?

@mageddo
Copy link
Author

mageddo commented Dec 28, 2015

Aw.. It was very easy, sorry I will check it.

@mageddo
Copy link
Author

mageddo commented Dec 28, 2015

How can I do tests, $ grunt?, I try run it on my terminal but all test fail too on 235554c

$ grunt 
0 passing (17s)
33 failing

@pghalliday
Copy link
Owner

Strange, that succeeded on Travis. What version of nodejs are you using?

@pghalliday
Copy link
Owner

hmm, just updated my node_modules and now get the same problem - somewhere an updated dependency has broken things

@pghalliday
Copy link
Owner

ok the problem was a change to the way blanket works for generating coverage when use strict is present. Have worked around it by removing the use strict

@pghalliday
Copy link
Owner

Yup now I only have 3 failing tests and they're all related to your changes. Can you update the tests to reflect what the new behaviour should be?

@mageddo
Copy link
Author

mageddo commented Dec 28, 2015

I am using node 0.12.7. Fine, I will cover the tests and update the pull request, can I push with use strict removed?

@pghalliday
Copy link
Owner

Best would be to do:

git fetch origin master
git rebase origin/master

That way you pick up the changes I just made and can put your changes on top of that - there shouldn't be any conflicts AFAIK.

Don't worry about use strict - it shouldn't have been on in the first place

thanks

@mageddo
Copy link
Author

mageddo commented Dec 28, 2015

Ok...

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