-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2481 from ractivejs/coverage
Add code coverage reporting
- Loading branch information
Showing
8 changed files
with
173 additions
and
82 deletions.
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Karma configuration | ||
// Generated on Sat Apr 02 2016 15:10:31 GMT+0200 (Západoeurópsky čas (letný)) | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: 'tmp', | ||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: [ 'qunit' ], | ||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
'ractive-legacy.js', | ||
'test/qunit-html.js', | ||
'test/simulant.js', | ||
'test/karma-init.js', | ||
'test/**/*js' | ||
], | ||
|
||
// list of files to exclude | ||
exclude: [ | ||
'test/node-tests/**', | ||
'test/utils/**', | ||
'test/blanket.js', | ||
'test/qunit.js', | ||
'test/qunit-tap.js' | ||
], | ||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'*.js': [ 'coverage' ] | ||
}, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: [ 'progress', 'coverage' ], | ||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: [ 'PhantomJS' ], | ||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: true, | ||
|
||
// client config | ||
client: { | ||
qunit: { | ||
reorder: false, | ||
testTimeout: 5000 | ||
} | ||
}, | ||
|
||
// generate output for coveralls | ||
coverageReporter: { | ||
reporters: [ | ||
{ type: 'html', subdir: 'report-html' }, | ||
{ type: 'lcovonly', subdir: '.', file: 'lcov.info' } | ||
] | ||
} | ||
}); | ||
}; |
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 @@ | ||
window.fixture = document.createElement('div'); | ||
window.fixture.id = 'fixture'; | ||
document.body.appendChild(window.fixture); | ||
|
||
QUnit.testDone(function () { | ||
window.fixture.innerHTML = ''; | ||
}); |
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