src/cm/scripts/test-suite/karma.conf.js
author Simon Descarpentries <sid@sopinspace.com>
Thu, 13 Mar 2014 18:19:43 +0100
changeset 613 a0b695aace0a
parent 579 869f02c75687
permissions -rw-r--r--
File field of Upload from file is now mandatory. Integrates 1sts IRI improvements in JavaScript test-suite. Continue testing error messages of mandatory fields, up to 704 tests.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
575
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     1
// Karma configuration
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     2
// Generated on Wed Jan 29 2014 15:32:16 GMT+0100 (CET)
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     3
613
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 579
diff changeset
     4
575
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     5
// SID: get WORKSPACE_URL configuration from one single file to customize
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     6
var w = require ('./workspace.info.js');
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     7
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     8
module.exports = function(config) {
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     9
	config.set({
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    10
		// list of files or patterns to load in the browser, from current directory
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    11
		files: [
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    12
			{pattern: 'tests/**/*.js', included: true}
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    13
		],
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    14
		// list of files to exclude
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    15
		exclude: [
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    16
		],
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    17
		// Start these browsers, currently available:
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    18
		// - Firefox	; Safari	(only Mac; run `npm install karma-safari-launcher` first)
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    19
		// - Chrome		; ChromeCanary ; Opera (run `npm install karma-opera-launcher` first)
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    20
		// - PhantomJS	; IE		(only Windows; run `npm install karma-ie-launcher` first)
613
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 579
diff changeset
    21
		browsers: w.BROWSERS,
575
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    22
		// frameworks to use. SID: choosen mocha, added karma-e2e-dsl (end-to-end testing)
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    23
		frameworks: ['mocha', 'karma-e2e-dsl'],
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    24
		// SID: Karma will start and run somewhere else than '/', to allow proxying '/'
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    25
		urlRoot: '/karma/',
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    26
		// SID: directive added on karma-e2e-dsl purpose. Map of path-proxy pairs.
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    27
		proxies: {
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    28
			'/': w.WORKSPACE_URL
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    29
		},
579
869f02c75687 daily progress : suite/test style, config from single config file, attempt to test i18n in footer
Simon Descarpentries <sid@sopinspace.com>
parents: 578
diff changeset
    30
		client: {
869f02c75687 daily progress : suite/test style, config from single config file, attempt to test i18n in footer
Simon Descarpentries <sid@sopinspace.com>
parents: 578
diff changeset
    31
			mocha: {
869f02c75687 daily progress : suite/test style, config from single config file, attempt to test i18n in footer
Simon Descarpentries <sid@sopinspace.com>
parents: 578
diff changeset
    32
				ui: 'tdd'
869f02c75687 daily progress : suite/test style, config from single config file, attempt to test i18n in footer
Simon Descarpentries <sid@sopinspace.com>
parents: 578
diff changeset
    33
			},
869f02c75687 daily progress : suite/test style, config from single config file, attempt to test i18n in footer
Simon Descarpentries <sid@sopinspace.com>
parents: 578
diff changeset
    34
			w: w // SID: exports the variable in the test execution browser window
869f02c75687 daily progress : suite/test style, config from single config file, attempt to test i18n in footer
Simon Descarpentries <sid@sopinspace.com>
parents: 578
diff changeset
    35
		},
575
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    36
		// test results reporter to use : 'dots', 'progress', 'junit', 'growl', 'coverage'
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    37
		reporters: ['progress'],
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    38
		// web server port
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    39
		port: 9876,
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    40
		// enable / disable colors in the output (reporters and logs)
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    41
		colors: true,
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    42
		// level of logging : config.LOG_DISABLE || _ERROR || _WARN || _INFO || _DEBUG
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    43
		logLevel: config.LOG_INFO || config.LOG_DEBUG,
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    44
		// enable / disable watching file and executing tests whenever any file changes
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    45
		autoWatch: false,
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    46
		// If browser does not capture in given timeout [ms], kill it
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    47
		captureTimeout: 20000,
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    48
		// Continuous Integration mode : if true, it capture browsers, run tests and exit
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    49
		// singleRun: false
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    50
		singleRun: true,
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    51
	});
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    52
};