Skip to content

Commit bcf59d7

Browse files
committed
replace Lib.isArray -> Array.isArray in tests w/o typed arrays
1 parent 2d81bdc commit bcf59d7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

test/jasmine/tests/parcoords_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ describe('@gl parcoords', function() {
615615
function restyleDimension(key, setterValue) {
616616

617617
// array values need to be wrapped in an array; unwrapping here for value comparison
618-
var value = Lib.isArray(setterValue) ? setterValue[0] : setterValue;
618+
var value = Array.isArray(setterValue) ? setterValue[0] : setterValue;
619619

620620
return function() {
621621
return Plotly.restyle(gd, 'dimensions[2].' + key, setterValue).then(function() {
@@ -875,7 +875,7 @@ describe('@gl parcoords', function() {
875875
Plotly.plot(gd, mockCopy.data, mockCopy.layout);
876876

877877
function restyleDimension(key, dimIndex, setterValue) {
878-
var value = Lib.isArray(setterValue) ? setterValue[0] : setterValue;
878+
var value = Array.isArray(setterValue) ? setterValue[0] : setterValue;
879879
return function() {
880880
return Plotly.restyle(gd, 'dimensions[' + dimIndex + '].' + key, setterValue).then(function() {
881881
expect(gd.data[0].dimensions[dimIndex][key]).toEqual(value, 'for dimension attribute \'' + key + '\'');

test/jasmine/tests/sankey_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ describe('sankey tests', function() {
179179
}
180180
});
181181

182-
expect(Lib.isArray(fullTrace.node.color)).toBe(true, 'set up color array');
182+
expect(Array.isArray(fullTrace.node.color)).toBe(true, 'set up color array');
183183
expect(fullTrace.node.color).toEqual(['rgba(31, 119, 180, 0.8)', 'rgba(255, 127, 14, 0.8)']);
184184

185185
});
@@ -197,7 +197,7 @@ describe('sankey tests', function() {
197197
}
198198
}, {colorway: ['rgb(255, 0, 0)', 'rgb(0, 0, 255)']});
199199

200-
expect(Lib.isArray(fullTrace.node.color)).toBe(true, 'set up color array');
200+
expect(Array.isArray(fullTrace.node.color)).toBe(true, 'set up color array');
201201
expect(fullTrace.node.color).toEqual(['rgba(255, 0, 0, 0.8)', 'rgba(0, 0, 255, 0.8)']);
202202

203203
});
@@ -215,7 +215,7 @@ describe('sankey tests', function() {
215215
}
216216
});
217217

218-
expect(Lib.isArray(fullTrace.link.label)).toBe(true, 'must be an array');
218+
expect(Array.isArray(fullTrace.link.label)).toBe(true, 'must be an array');
219219
expect(fullTrace.link.label).toEqual([], 'an array of empty strings');
220220
});
221221

@@ -233,7 +233,7 @@ describe('sankey tests', function() {
233233
}
234234
});
235235

236-
expect(Lib.isArray(fullTrace.link.label)).toBe(true, 'must be an array');
236+
expect(Array.isArray(fullTrace.link.label)).toBe(true, 'must be an array');
237237
expect(fullTrace.link.label).toEqual(['a', 'b'], 'an array of the supplied values');
238238
});
239239
});

test/jasmine/tests/table_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ describe('table', function() {
318318
function restyleValues(what, key, setterValue) {
319319

320320
// array values need to be wrapped in an array; unwrapping here for value comparison
321-
var value = Lib.isArray(setterValue) ? setterValue[0] : setterValue;
321+
var value = Array.isArray(setterValue) ? setterValue[0] : setterValue;
322322

323323
return function() {
324324
return Plotly.restyle(gd, what + '.values[' + key + ']', setterValue).then(function() {
@@ -367,7 +367,7 @@ describe('table', function() {
367367

368368
function restyleValues(what, fun, setterValue) {
369369

370-
var value = Lib.isArray(setterValue) ? setterValue[0] : setterValue;
370+
var value = Array.isArray(setterValue) ? setterValue[0] : setterValue;
371371

372372
return function() {
373373
return Plotly.restyle(gd, what, setterValue).then(function() {

0 commit comments

Comments
 (0)