sglanzer-deprecated/ember-cli-blanket

Express JS not running with ember-cli 1.13.1 so no report generated

Closed this issue · 1 comments

I could not get ExpressJS, the mock server, to run with ember-cli test. Maybe I am missing some ember-cli or testem config? This discussion seems to indicate that express JS will not run in test environment:
ember-cli/ember-cli#1763

I am able to get the browser UI to show the coverage report with "ember test --server" and it does do a POST to /write-blanket-coverage. But nothing is written on the back end because the mock server is not running. These are my configs:
blanket-options.js:

/* globals blanket, module */

var options = {
  modulePrefix: 'frontend',
  filter: '//.*frontend/.*/',
  antifilter: '//.*(tests|template).*/',
  loaderExclusions: [],
  enableCoverage: true,
  ignoreScriptError: true,
  cliOptions: {
    reporters: ['json'],
    jsonOptions: {
      outputFile: 'test-output.json' // default is 'coverage.json' 
    },
    lcovOptions: {
      outputFile: 'lcov.dat',
      //provide a function to rename es6 modules to a file path 
      renamer: function(moduleName){
        var expression = /^APP_NAME/;
        return moduleName.replace(expression, 'app') + '.js';
      }
    },
    autostart: true
  }
};
if (typeof exports === 'undefined') {
  blanket.options(options);
} else {
  module.exports = options;
}

testem.json:

{
  "framework": "qunit",
  "test_page": "tests/index.html?hidepassed",
  "disable_watching": true,
  "launch_in_ci": [
    "PhantomJS"
  ],
  "launch_in_dev": [
    "PhantomJS",
    "Chrome"
  ]
}

This was resolved in #100

please reopen if still persisting