-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
From: #420 (comment)
In reviewing comments from @kategengler here #380 (comment), I have experimented and found the below interim solution.
The README should reflect the below interim solution while this issue is present.
Add the below line as a new property in the APP object of the file config/environment.js:
APP: {
isRunningWithServerArgs: process.argv.includes('--server') || process.argv.includes('-s')
}In the existing file tests/test-helper.js, replace the block of code:
import { forceModulesToBeLoaded, sendCoverage } from 'ember-cli-code-coverage/test-support';
import Qunit from 'qunit';
QUnit.done(async function() {
forceModulesToBeLoaded();
await sendCoverage();
});with instead:
import { forceModulesToBeLoaded, sendCoverage } from 'ember-cli-code-coverage/test-support';
import Qunit from 'qunit';
if (config.APP.isRunningWithServerArgs) {
// until Testem is patched, this will fail to POST coverage in CI mode (running tests with -s or --server as an argument)
// Ref: https://github.com/testem/testem/issues/1577
QUnit.done(async function () {
forceModulesToBeLoaded();
await sendCoverage();
});
} else {
//eslint-disable-next-line no-undef
Testem.afterTests(function (config, data, callback) {
forceModulesToBeLoaded();
sendCoverage(callback);
});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels