Fixed test report paths
This commit is contained in:
parent
583b7d8cc3
commit
c797a4ce33
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -9,12 +9,8 @@ dist
|
||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
# Ignore mocha test data
|
# Ignore test reports
|
||||||
test/data
|
test/report
|
||||||
|
|
||||||
# Ignore example data
|
|
||||||
example/node_modules
|
|
||||||
example/npm-debug.log
|
|
||||||
|
|
||||||
# Ignore example cordova data
|
# Ignore example cordova data
|
||||||
example/app_mobile/platforms/*
|
example/app_mobile/platforms/*
|
||||||
|
|
|
@ -1,63 +1,49 @@
|
||||||
module.exports = function(config) {
|
module.exports = function(config) {
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '..',
|
basePath : '..',
|
||||||
frameworks: ['jasmine', 'requirejs'],
|
plugins : ['karma-requirejs',
|
||||||
files: [{
|
'karma-coverage',
|
||||||
pattern: 'es5-ff-spa-loader.js',
|
'karma-phantomjs-launcher',
|
||||||
included: false
|
'karma-jasmine',
|
||||||
}, {
|
'karma-jshint',
|
||||||
pattern: 'test/spec/**/*.js',
|
'karma-mocha-reporter',
|
||||||
included: false
|
'karma-junit-reporter'
|
||||||
},
|
],
|
||||||
'test/spec-runner.js'],
|
frameworks : [ 'jasmine', 'requirejs' ],
|
||||||
|
files : [ {
|
||||||
preprocessors: {
|
pattern : 'es5-ff-spa-loader.js',
|
||||||
'es5-ff-spa-loader.js': ['jshint','coverage'],
|
included : false
|
||||||
'example/**/*.js': ['jshint'],
|
}, {
|
||||||
'test/**/*.js': ['jshint']
|
pattern : 'test/spec/**/*.js',
|
||||||
},
|
included : false
|
||||||
reporters: ['coverage', 'mocha', 'junit'],
|
}, 'test/spec-runner.js' ],
|
||||||
|
browsers : [ 'PhantomJS' ],
|
||||||
// the default configuration
|
preprocessors : {
|
||||||
junitReporter: {
|
'es5-ff-spa-loader.js' : [ 'jshint', 'coverage' ],
|
||||||
outputDir: 'test/data/coverage', // results will be saved as $outputDir/$browserName.xml
|
'example/**/*.js' : [ 'jshint' ],
|
||||||
outputFile: undefined, // if included, results will be saved as $outputDir/$browserName/$outputFile
|
'test/**/*.js' : [ 'jshint' ]
|
||||||
suite: '', // suite will become the package name attribute in xml testsuite element
|
},
|
||||||
useBrowserName: false, // add browser name to report and classes names
|
reporters : [ 'coverage', 'mocha', 'junit' ],
|
||||||
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
|
coverageReporter : {
|
||||||
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element,
|
dir : 'test/report',
|
||||||
properties: {} // key value pair of properties to add to the <properties> section of the report
|
reporters : [ {
|
||||||
},
|
type : 'lcov',
|
||||||
|
subdir : '.'
|
||||||
jshint: {
|
} ]
|
||||||
options: {
|
},
|
||||||
strict: true,
|
junitReporter : {
|
||||||
browser: true,
|
outputDir : 'test/report',
|
||||||
jasmine: true,
|
outputFile : 'TEST-karma.xml',
|
||||||
predef: ['define']
|
useBrowserName : false,
|
||||||
},
|
},
|
||||||
summary: true
|
jshint : {
|
||||||
},
|
options : {
|
||||||
|
strict : true,
|
||||||
plugins: [
|
browser : true,
|
||||||
'karma-requirejs',
|
jasmine : true,
|
||||||
'karma-coverage',
|
predef : [ 'define' ]
|
||||||
'karma-phantomjs-launcher',
|
},
|
||||||
'karma-jasmine',
|
summary : true
|
||||||
'karma-jshint',
|
}
|
||||||
'karma-mocha-reporter',
|
});
|
||||||
'karma-junit-reporter'
|
|
||||||
],
|
|
||||||
|
|
||||||
coverageReporter: {
|
|
||||||
// specify a common output directory
|
|
||||||
dir: 'test/data/coverage',
|
|
||||||
reporters: [
|
|
||||||
{ type: 'lcov', subdir: 'report-lcov' },
|
|
||||||
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
browsers: ['PhantomJS']
|
|
||||||
});
|
|
||||||
};
|
};
|
|
@ -92,16 +92,8 @@ function renderIndex() {
|
||||||
|
|
||||||
// Add resources ORDERED per type
|
// Add resources ORDERED per type
|
||||||
addClientResource('/static/module/jquery/jquery.js','js');
|
addClientResource('/static/module/jquery/jquery.js','js');
|
||||||
//addClientResource('/static/module/angular/angular.js','js');
|
|
||||||
//addClientResource('/static/module/angular-route/angular-route.js','js');
|
|
||||||
addClientResource('/static/module/bootstrap/css/bootstrap.css','css');
|
addClientResource('/static/module/bootstrap/css/bootstrap.css','css');
|
||||||
addClientResource('/static/module/bootstrap/js/bootstrap.js','js');
|
addClientResource('/static/module/bootstrap/js/bootstrap.js','js');
|
||||||
//addClientResource('/static/css/boot.css','css');
|
|
||||||
//addClientResource('/static/css/style.css','css');
|
|
||||||
//addClientResource('/static/js/example-app.js','js'); // deps: jquery,angular
|
|
||||||
//addClientResource('/static/js/controller/page-bar.js','js'); // deps: example-app.js
|
|
||||||
//addClientResource('/static/js/controller/page-foo.js','js');
|
|
||||||
//addClientResource('/static/js/controller/page-index.js','js');
|
|
||||||
|
|
||||||
var appPath = '/test';
|
var appPath = '/test';
|
||||||
var server = express();
|
var server = express();
|
||||||
|
@ -113,8 +105,6 @@ server.use(function(req, res, next) { res.header('X-My-Api', 'nokno
|
||||||
server.use(appPath+'/static', express.static(path.join(__dirname,'www_static')));
|
server.use(appPath+'/static', express.static(path.join(__dirname,'www_static')));
|
||||||
server.use(appPath+'/static/module/bootstrap', express.static(path.join(__dirname,'../node_modules/bootstrap/dist')));
|
server.use(appPath+'/static/module/bootstrap', express.static(path.join(__dirname,'../node_modules/bootstrap/dist')));
|
||||||
server.use(appPath+'/static/module/jquery', express.static(path.join(__dirname,'../node_modules/jquery/dist')));
|
server.use(appPath+'/static/module/jquery', express.static(path.join(__dirname,'../node_modules/jquery/dist')));
|
||||||
server.use(appPath+'/static/module/angular', express.static(path.join(__dirname,'../node_modules/angular')));
|
|
||||||
server.use(appPath+'/static/module/angular-route', express.static(path.join(__dirname,'../node_modules/angular-route')));
|
|
||||||
server.get(appPath+'/static/spa-client-resources', function (req,res) {res.json({data: {resources: clientResourcesWeb}});});
|
server.get(appPath+'/static/spa-client-resources', function (req,res) {res.json({data: {resources: clientResourcesWeb}});});
|
||||||
server.get(appPath+'/static/spa-loader.css', function (req,res) {res.sendFile('es5-ff-spa-loader.css', { root: path.join(__dirname, '/../../') });});
|
server.get(appPath+'/static/spa-loader.css', function (req,res) {res.sendFile('es5-ff-spa-loader.css', { root: path.join(__dirname, '/../../') });});
|
||||||
server.get(appPath+'/', function (req, res) {res.redirect(appPath+'/example-ui');});
|
server.get(appPath+'/', function (req, res) {res.redirect(appPath+'/example-ui');});
|
||||||
|
|
Loading…
Reference in a new issue