Skip to content
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

Switch test progress to use the karma-spec-reporter. #829

Merged
merged 3 commits into from
May 30, 2018
Merged
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
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ before_install:
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24"
- CACHE="${HOME}/cache" CMAKE_VERSION=3.5.0 CMAKE_SHORT_VERSION=3.5 source ./scripts/install_cmake.sh
- npm install -g npm@latest
- npm install -g node-pre-gyp
- npm prune
# Prune the npm packages. If this fails for any reason, just remove them all
- npm prune || rm -r node_modules

install:
# travis moved to "npm ci", but that fails with canvas-prebuilt as it tries
# to install it before node-pre-gyp
- npm install

before_script:
- export DISPLAY=:99.0
Expand Down
4 changes: 3 additions & 1 deletion karma-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,11 @@ module.exports = function (config) {
},
browserNoActivityTimeout: 30000,
reporters: [
'progress',
'spec', // we had used the 'progress' reporter in the past.
'kjhtml'
],
// We could suppress passing results
// specReporter = {suppressPassed: true, suppressSkipped: true},
middleware: [
'notes',
'osmtiles'
Expand Down
6 changes: 4 additions & 2 deletions karma-cov.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function subdir_name(b) {
/* Use thes test case and as part of the name so that different tests end
* up in different coverage directories. Get the last element of the path
* without the extension from the test case for this purpose. */
var parts = /^(.+\/)*(([^\/]+)\.[^\/.]*|[^\/.]+)$/.exec(process.env.GEOJS_TEST_CASE);
var parts = /^(.+\/)*(([^/]+)\.[^/.]*|[^/.]+)$/.exec(process.env.GEOJS_TEST_CASE);
if (parts) {
subdir += '_' + (parts[3] || parts[2]);
}
Expand All @@ -29,7 +29,9 @@ function subdir_name(b) {
module.exports = function (config) {
var karma_config = require('./karma-base')(config);

karma_config.reporters = ['progress', 'coverage'];
karma_config.reporters = ['spec', 'coverage'];
/* Suppress listing passing and skipped tests when getting coverage. */
karma_config.specReporter = {suppressPassed: true, suppressSkipped: true};
karma_config.coverageReporter = {
reporters: [
{type: 'html', dir: 'dist/coverage/', subdir: subdir_name},
Expand Down
Loading