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

Running Blanket Programmatically #549

Open
paranoid-android opened this issue Jan 4, 2016 · 0 comments
Open

Running Blanket Programmatically #549

paranoid-android opened this issue Jan 4, 2016 · 0 comments

Comments

@paranoid-android
Copy link

Hello,

I have a Node.js app. I have been trying to run Blanket programmatically within the app without success. I do not get any errors. However, I do not get any details either. I ensured I was using the engineOnly flag as shown my package.json file below:

package.json

...
"config": {
  "blanket": {
    "data-cover-flags": {
      "engineOnly":true
    }
  }      
}
...

I'm running my tests like this:

app.js

function runTests() {
  var Jasmine = require('jasmine');
  var jasmine = new Jasmine();  

  jasmine.loadConfig({
    spec_dir: 'tests',
    spec_files: [
      'tests-*.js'
    ]
  });

  var blanket = require("blanket")({
    debug:true,
    pattern: ['**.js'],
    reporter: function(data) {
      console.log('Coverage reporter ran.');     
    }
  });
  jasmine.execute();    
}
runTests();

I have 2 tests that run successfully and as expected. Its just that no coverage data is showing up. I was expecting to see something since I set the debug flag to true. This implies that I'm not "starting" blanket properly. yet, I'm not sure what I'm missing. It seems pretty straight forward.

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