Fix setup after ng4 changes

merge-requests/1/head
Florian Hartwich 2017-03-25 06:36:38 +01:00
parent fc741a0469
commit c87588ebcf
4 changed files with 3 additions and 127 deletions

View File

@ -46,7 +46,7 @@
},
"test": {
"karma": {
"config": "./.karma.conf.js"
"config": "./karma.conf.js"
}
},
"defaults": {

View File

@ -1,74 +0,0 @@
// Karma configuration
// Generated on Sat Mar 25 2017 06:01:47 GMT+0100 (CET)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'./src/**/*.spec.ts'
],
// list of files to exclude
exclude: [
],
// Redefine default mapping from file extensions to MIME-type
// Set property name to required MIME, provide Array of extensions (without dots) as it's value
mime: {
'text/x-typescript': ['ts','tsx']
},
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}

View File

@ -44,6 +44,8 @@
"@types/socket.io-client": "^1.4.26",
"codelyzer": "~2.0.0-beta.1",
"concurrently": "^2.0.0",
"jasmine-core": "^2.5.2",
"karma": "^1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-jasmine": "^1.1.0",
"ts-node": "1.2.1",

View File

@ -1,52 +0,0 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/docs/referenceConf.js
/*global jasmine */
var SpecReporter = require('jasmine-spec-reporter');
//var ScreenshotProcessor = require('./e2e/helpers/screen_shot_reporter.ts');
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
var reporter = new HtmlScreenshotReporter({
dest: 'tmp/screenshots',
filename: 'test-report.html',
cleanDestination: true,
ignoreSkippedSpecs: true,
captureOnlyFailedSpecs: false
});
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'firefox'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
useAllAngular2AppRoots: true,
beforeLaunch: function() {
require('ts-node').register({
project: 'e2e'
});
return new Promise(function(resolve){
reporter.beforeLaunch(resolve);
});
},
afterLaunch: function(exitCode) {
return new Promise(function(resolve){
reporter.afterLaunch(resolve.bind(this, exitCode));
});
},
onPrepare: function() {
jasmine.getEnv().addReporter(reporter);
jasmine.getEnv().addReporter(new SpecReporter());
},
};