Skip to content

Commit 1e1495f

Browse files
authored
Merge pull request #3285 from plotly/test-ie-on-appveyor
Add (some) IE11 testing on AppVeyor
2 parents 75516a4 + 50218de commit 1e1495f

File tree

5 files changed

+40
-8
lines changed

5 files changed

+40
-8
lines changed

appveyor.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
environment:
2+
nodejs_version: "10"
3+
4+
install:
5+
- ps: Install-Product node $env:nodejs_version
6+
# faster than `npm install`
7+
- npm ci
8+
9+
test_script:
10+
- node --version
11+
- npm --version
12+
- npm run test-jasmine -- lib --IE11
13+
14+
build: off

package-lock.json

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
"karma-chrome-launcher": "^2.0.0",
140140
"karma-fail-fast-reporter": "^1.0.5",
141141
"karma-firefox-launcher": "^1.0.1",
142+
"karma-ie-launcher": "^1.0.0",
142143
"karma-jasmine": "^1.1.2",
143144
"karma-jasmine-spec-tags": "^1.0.1",
144145
"karma-spec-reporter": "0.0.32",

test/jasmine/karma.conf.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ var path = require('path');
44
var minimist = require('minimist');
55
var constants = require('../../tasks/util/constants');
66

7-
var isCI = !!process.env.CIRCLECI;
7+
var isCI = !!process.env.CI;
88
var argv = minimist(process.argv.slice(4), {
99
string: ['bundleTest', 'width', 'height'],
10-
'boolean': ['info', 'nowatch', 'failFast', 'verbose', 'Chrome', 'Firefox'],
10+
'boolean': ['info', 'nowatch', 'failFast', 'verbose', 'Chrome', 'Firefox', 'IE11'],
1111
alias: {
1212
'Chrome': 'chrome',
1313
'Firefox': ['firefox', 'FF'],
14+
'IE11': ['ie11'],
1415
'bundleTest': ['bundletest', 'bundle_test'],
1516
'nowatch': 'no-watch',
1617
'failFast': 'fail-fast'
@@ -54,6 +55,7 @@ if(argv.info) {
5455
' - `--info`: show this info message',
5556
' - `--Chrome` (alias `--chrome`): run test in (our custom) Chrome browser',
5657
' - `--Firefox` (alias `--FF`, `--firefox`): run test in (our custom) Firefox browser',
58+
' - `--IE11` (alias -- `ie11`)`: run test in IE11 browser',
5759
' - `--nowatch (dflt: `false`, `true` on CI)`: run karma w/o `autoWatch` / multiple run mode',
5860
' - `--failFast` (dflt: `false`): exit karma upon first test failure',
5961
' - `--verbose` (dflt: `false`): show test result using verbose reporter',
@@ -302,6 +304,7 @@ func.defaultConfig.files.push(testFileGlob);
302304
var browsers = func.defaultConfig.browsers;
303305
if(argv.Chrome) browsers.push('_Chrome');
304306
if(argv.Firefox) browsers.push('_Firefox');
307+
if(argv.IE11) browsers.push('IE');
305308
if(browsers.length === 0) browsers.push('_Chrome');
306309

307310
module.exports = func;

test/jasmine/tests/lib_test.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -1558,12 +1558,17 @@ describe('Test lib.js:', function() {
15581558

15591559
describe('cleanNumber', function() {
15601560
it('should return finite numbers untouched', function() {
1561-
[
1562-
0, 1, 2, 1234.567,
1563-
-1, -100, -999.999,
1564-
Number.MAX_VALUE, Number.MIN_VALUE, Number.EPSILON,
1565-
-Number.MAX_VALUE, -Number.MIN_VALUE, -Number.EPSILON
1566-
].forEach(function(v) {
1561+
var vals = [
1562+
0, 1, 2, 1234.567, -1, -100, -999.999,
1563+
Number.MAX_VALUE, Number.MIN_VALUE,
1564+
-Number.MAX_VALUE, -Number.MIN_VALUE
1565+
];
1566+
1567+
if(!Lib.isIE()) {
1568+
vals.push(Number.EPSILON, -Number.EPSILON);
1569+
}
1570+
1571+
vals.forEach(function(v) {
15671572
expect(Lib.cleanNumber(v)).toBe(v);
15681573
});
15691574
});

0 commit comments

Comments
 (0)