Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

lint error and test bug #2

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ pipeline {
}
stage('Run Unit Tests') {
steps {
echo 'npm run test-single-run'
sauce('e16593fe-6899-463b-9595-e5ba5eb46563') {
sauceconnect(options: '', sauceConnectPath: '') {
sh 'npm run test-single-run'
}
}
}
}
stage('Deploy Application') {
Expand Down
81 changes: 61 additions & 20 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,75 @@
//jshint strict: false
module.exports = function(config) {

// Browsers to run on Sauce Labs
var customLaunchers = {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome',
version: '48.0',
platform: 'Linux'
},
'SL_Firefox': {
base: 'SauceLabs',
browserName: 'firefox',
version: '50.0',
platform: 'Windows 10'
},
'SL_InternetExplorer': {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '11.0',
platform: 'Windows 7'
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: '10.0'
}
};

config.set({

basePath: './app',
// 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: [
'bower_components/angular/angular.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-mocks/angular-mocks.js',
'components/**/*.js',
'view*/**/*.js'
'app/*.js',
],

autoWatch: true,

frameworks: ['jasmine'],
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['dots', 'saucelabs'],

browsers: ['Chrome'],

plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine',
'karma-junit-reporter'
],
// web server port
port: 9876,

junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
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,

sauceLabs: {
testName: 'Karma and Sauce Labs demo',
connectTunnel: false,
},
captureTimeout: 120000,
customLaunchers: customLaunchers,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: Object.keys(customLaunchers),
singleRun: true
});
};