Skip to content

Commit b42f021

Browse files
committed
use karma-jasmine-spec-tags to skip a few test on CI
- unfortunately, still some test need to be skipped on CI e.g. mapbox-gl takes too much resources ant blows up the run and similarly for some parcoords tests.
1 parent 14621e1 commit b42f021

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"karma-coverage": "^1.0.0",
120120
"karma-firefox-launcher": "^1.0.0",
121121
"karma-jasmine": "^1.1.0",
122+
"karma-jasmine-spec-tags": "^1.0.1",
122123
"madge": "^1.6.0",
123124
"node-sass": "^4.5.0",
124125
"npm-link-check": "^1.2.0",

test/jasmine/karma.conf.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func.defaultConfig = {
5454

5555
// frameworks to use
5656
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
57-
frameworks: ['jasmine', 'browserify'],
57+
frameworks: ['jasmine', 'jasmine-spec-tags', 'browserify'],
5858

5959
// list of files / patterns to load in the browser
6060
//
@@ -119,6 +119,15 @@ func.defaultConfig = {
119119
extensions: ['.js'],
120120
watch: !isCI,
121121
debug: true
122+
123+
// unfortunately a few tests don't behave well on CI
124+
// using `karma-jasmine-spec-tags`
125+
// add @noCI to the spec description to skip a spec on CI
126+
client: {
127+
tagPrefix: '@',
128+
skipTags: isCI ? 'noCI' : null
129+
},
130+
122131
}
123132
};
124133

test/jasmine/tests/gl2d_click_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Plotly.register([
1616
require('@lib/contourgl')
1717
]);
1818

19-
describe('Test hover and click interactions', function() {
19+
describe('@noCI Test hover and click interactions', function() {
2020

2121
var mock = require('@mocks/gl2d_14.json');
2222
var mock2 = require('@mocks/gl2d_pointcloud-basic.json');

test/jasmine/tests/mapbox_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ describe('mapbox credentials', function() {
276276
}, LONG_TIMEOUT_INTERVAL);
277277
});
278278

279-
describe('mapbox plots', function() {
279+
describe('@noCI, mapbox plots', function() {
280280
'use strict';
281281

282282
var mock = require('@mocks/mapbox_0.json'),

test/jasmine/tests/parcoords_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ describe('parcoords initialization tests', function() {
219219
});
220220
});
221221

222-
describe('parcoords', function() {
222+
describe('@noCI parcoords', function() {
223223

224224
beforeAll(function() {
225225
mock.data[0].dimensions.forEach(function(d) {

test/jasmine/tests/scattermapbox_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ describe('scattermapbox convert', function() {
451451
}
452452
});
453453

454-
describe('scattermapbox hover', function() {
454+
describe('@noCI scattermapbox hover', function() {
455455
'use strict';
456456

457457
var hoverPoints = ScatterMapbox.hoverPoints;

0 commit comments

Comments
 (0)