i have a problem, i don't think it's normal.
When i launch the command 'ng test --watch=false' with at least one test in error (wrong expect) the command quit with this error
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ulys-nav@0.0.1 test: `ng test --watch=false`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ulys-nav@0.0.1 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/martels3/.npm/_logs/2019-10-21T11_20_00_883Z-debug.log
But when i fix the test (correct expect), every is normal (without error).
Here is my karma.conf.js
const puppeteer = require('puppeteer');
process.env.CHROME_BIN = puppeteer.executablePath();
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine: {
random: false
}
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome', 'ChromeHeadless'],
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--disable-gpu']
}
},
singleRun: false,
captureTimeout: 210000,
browserDisconnectTolerance: 3,
browserDisconnectTimeout: 210000,
browserNoActivityTimeout: 210000
});
};
Is it normal to have this horrible error? Because when i launch this command in the CI (bitRise), it quit because of this and i don't want to !
Aucun commentaire:
Enregistrer un commentaire