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

Coverage does not follow same code path as tests #32

Open
toboid opened this issue Feb 20, 2014 · 0 comments
Open

Coverage does not follow same code path as tests #32

toboid opened this issue Feb 20, 2014 · 0 comments

Comments

@toboid
Copy link

toboid commented Feb 20, 2014

We have grunt-mocha-cov configured as follows:

mochacov: {
  test: {
    options: {
      reporter: 'spec',
      require: ['should']
    },
    files: 'tests/**/*.js'
  },
  coverage: {
    options: {
      reporter: 'mocha-lcov-reporter',
      require: ['should'],
      coverage: true,
      output: 'rprts/cov.lcov'
    },
    files: { src: 'tests/**/*.js' }
  }
}

we are using hapi, and also using mockery for a couple of tests in specific situations.
When using hapi.inject for testing, and mockery at the same time, the unit tests run correctly and use the mock, however the coverage does not use the mock.

Realise this is a very specific situation, but clear that the tests and coverage are running differently. Any assistance or suggestions would be greatly appreciated.

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

1 participant