New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add codecoverage #114
Merged
Merged
Add codecoverage #114
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,101 @@ | ||
var webpackConfig = require('./webpack.config.js'); | ||
const path = require('path') | ||
|
||
module.exports = function (config) { | ||
var ownCloudConfig = require('./owncloud/test/config.json'); | ||
config.set({ | ||
|
||
client: { | ||
ownCloudConfig: ownCloudConfig, | ||
jasmine: { | ||
random: false, | ||
var ownCloudConfig = require('./owncloud/test/config.json') | ||
config.set({ | ||
|
||
client: { | ||
ownCloudConfig: ownCloudConfig, | ||
jasmine: { | ||
random: false | ||
} | ||
}, | ||
|
||
// 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: [ | ||
'tests/karma.js', | ||
'node_modules/utf8/utf8.js', | ||
'tests/unauthenticated/*Test.js', | ||
'tests/*.js' | ||
], | ||
|
||
// list of files / patterns to exclude | ||
exclude: [], | ||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'tests/karma.js': ['webpack'] | ||
}, | ||
|
||
webpack: { | ||
output: { | ||
filename: 'bundle.js' | ||
}, | ||
resolve: { | ||
extensions: ['.js', '.json'] | ||
}, | ||
devtool: 'inline-source-map', | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: [ path.resolve(__dirname, 'test'), /node_modules/ ], | ||
enforce: 'post', | ||
use: { | ||
loader: 'istanbul-instrumenter-loader', | ||
options: { esModules: true } | ||
} | ||
}, | ||
|
||
// 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: [ | ||
'node_modules/utf8/utf8.js', | ||
'browser/toBundle.js', | ||
'tests/unauthenticated/*Test.js', | ||
'tests/*.js' | ||
], | ||
|
||
// list of files / patterns to exclude | ||
exclude: webpackConfig, | ||
|
||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'./browser/toBundle.js': ['webpack'] | ||
}, | ||
|
||
webpack: {}, | ||
|
||
webpackMiddleware: { | ||
noInfo: true | ||
}, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['dots'], | ||
|
||
|
||
// 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: ['ChromeHeadless', '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 | ||
}); | ||
}; | ||
} | ||
] | ||
} | ||
}, | ||
|
||
webpackMiddleware: { | ||
noInfo: true | ||
}, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['dots', 'coverage-istanbul'], | ||
|
||
// 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: ['ChromeHeadless', '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, | ||
|
||
coverageIstanbulReporter: { | ||
reports: [ 'lcovonly', 'text' ], | ||
dir: path.join(__dirname, 'coverage'), | ||
fixWebpackSourcePaths: true | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* eslint-disable new-cap */ | ||
var owncloud = require('../owncloud/index.js') | ||
var oc = new owncloud() | ||
|
||
window.oc = oc | ||
window.ownCloud = owncloud | ||
window.OwnCloud = owncloud |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has to go away - tests need to be written in es6 and transpiled