Skip to content

Commit cb00901

Browse files
committed
fail -> failTest - fail is a jasmine global
1 parent 68e9e48 commit cb00901

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

test/jasmine/tests/parcoords_test.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var attributes = require('@src/traces/parcoords/attributes');
88
var createGraphDiv = require('../assets/create_graph_div');
99
var delay = require('../assets/delay');
1010
var destroyGraphDiv = require('../assets/destroy_graph_div');
11-
var fail = require('../assets/fail_test');
11+
var failTest = require('../assets/fail_test');
1212
var mouseEvent = require('../assets/mouse_event');
1313
var supplyAllDefaults = require('../assets/supply_defaults');
1414

@@ -318,7 +318,7 @@ describe('@gl parcoords', function() {
318318
expect(gd.data[0].dimensions[1].range).toEqual([0, 700000]);
319319
expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined();
320320
})
321-
.catch(fail)
321+
.catch(failTest)
322322
.then(done);
323323
});
324324

@@ -337,7 +337,7 @@ describe('@gl parcoords', function() {
337337
expect(gd.data[0].dimensions[0].constraintrange).toBeDefined();
338338
expect(gd.data[0].dimensions[0].constraintrange).toEqual([200, 700]);
339339
})
340-
.catch(fail)
340+
.catch(failTest)
341341
.then(done);
342342
});
343343

@@ -352,7 +352,7 @@ describe('@gl parcoords', function() {
352352
expect(gd.data[0].dimensions.length).toEqual(0);
353353
expect(document.querySelectorAll('.axis').length).toEqual(0);
354354
})
355-
.catch(fail)
355+
.catch(failTest)
356356
.then(done);
357357
});
358358

@@ -370,7 +370,7 @@ describe('@gl parcoords', function() {
370370
expect(gd.data[0].dimensions.length).toEqual(2);
371371
expect(document.querySelectorAll('.axis').length).toEqual(2);
372372
})
373-
.catch(fail)
373+
.catch(failTest)
374374
.then(done);
375375
});
376376

@@ -398,7 +398,7 @@ describe('@gl parcoords', function() {
398398
expect(document.querySelectorAll('.axis').length).toEqual(2);
399399
expect(gd.data[0].dimensions[0].values.length).toEqual(1);
400400
})
401-
.catch(fail)
401+
.catch(failTest)
402402
.then(done);
403403
});
404404

@@ -423,7 +423,7 @@ describe('@gl parcoords', function() {
423423
expect(document.querySelectorAll('.axis').length).toEqual(0);
424424
expect(gd.data[0].dimensions[0].values.length).toEqual(0);
425425
})
426-
.catch(fail)
426+
.catch(failTest)
427427
.then(done);
428428
});
429429

@@ -452,7 +452,7 @@ describe('@gl parcoords', function() {
452452
expect(document.querySelectorAll('.axis').length).toEqual(2);
453453
expect(gd.data[0].dimensions[0].values.length).toEqual(values[0].length);
454454
})
455-
.catch(fail)
455+
.catch(failTest)
456456
.then(done);
457457
});
458458

@@ -483,7 +483,7 @@ describe('@gl parcoords', function() {
483483
expect(gd.data[0].dimensions.length).toEqual(60);
484484
expect(document.querySelectorAll('.axis').length).toEqual(60);
485485
})
486-
.catch(fail)
486+
.catch(failTest)
487487
.then(done);
488488
});
489489

@@ -512,7 +512,7 @@ describe('@gl parcoords', function() {
512512
expect(gd.data[0].dimensions.length).toEqual(60);
513513
expect(document.querySelectorAll('.axis').length).toEqual(60);
514514
})
515-
.catch(fail)
515+
.catch(failTest)
516516
.then(done);
517517
});
518518

@@ -542,7 +542,7 @@ describe('@gl parcoords', function() {
542542
expect(gd.data[0].dimensions.length).toEqual(60);
543543
expect(document.querySelectorAll('.axis').length).toEqual(60);
544544
})
545-
.catch(fail)
545+
.catch(failTest)
546546
.then(done);
547547
});
548548

@@ -576,7 +576,7 @@ describe('@gl parcoords', function() {
576576
expect(gd.data[0].dimensions.length).toEqual(5); // it's still five, but ...
577577
expect(document.querySelectorAll('.axis').length).toEqual(3); // only 3 axes shown
578578
})
579-
.catch(fail)
579+
.catch(failTest)
580580
.then(done);
581581
});
582582

@@ -595,7 +595,7 @@ describe('@gl parcoords', function() {
595595
};
596596
gd = createGraphDiv();
597597
Plotly.plot(gd, mockCopy.data, mockCopy.layout)
598-
.catch(fail)
598+
.catch(failTest)
599599
.then(done);
600600
});
601601

@@ -642,7 +642,7 @@ describe('@gl parcoords', function() {
642642

643643
expect(document.querySelectorAll('.axis').length).toEqual(20); // one dimension is `visible: false`
644644
})
645-
.catch(fail)
645+
.catch(failTest)
646646
.then(done);
647647

648648
});
@@ -662,7 +662,7 @@ describe('@gl parcoords', function() {
662662
expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]);
663663
expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined();
664664
})
665-
.catch(fail)
665+
.catch(failTest)
666666
.then(done);
667667

668668
});
@@ -689,7 +689,7 @@ describe('@gl parcoords', function() {
689689
.then(restyleDimension('constraintrange', [[0, 1]]))
690690
.then(restyleDimension('values', [[0, 0.1, 0.4, 1, 2, 0, 0.1, 0.4, 1, 2]]))
691691
.then(restyleDimension('visible', false))
692-
.catch(fail)
692+
.catch(failTest)
693693
.then(done);
694694
});
695695

@@ -711,7 +711,7 @@ describe('@gl parcoords', function() {
711711
expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]);
712712
expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined();
713713
})
714-
.catch(fail)
714+
.catch(failTest)
715715
.then(done);
716716
});
717717

@@ -736,7 +736,7 @@ describe('@gl parcoords', function() {
736736
.then(function() {
737737
expect(tester.get()).toBe(true);
738738
})
739-
.catch(fail)
739+
.catch(failTest)
740740
.then(done);
741741

742742
});
@@ -785,7 +785,7 @@ describe('@gl parcoords', function() {
785785

786786
}, 20);
787787
})
788-
.catch(fail)
788+
.catch(failTest)
789789
.then(done);
790790

791791
});
@@ -806,7 +806,7 @@ describe('@gl parcoords', function() {
806806
expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]);
807807
expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined();
808808
})
809-
.catch(fail)
809+
.catch(failTest)
810810
.then(done);
811811
});
812812

@@ -826,7 +826,7 @@ describe('@gl parcoords', function() {
826826
expect(gd.data[0].dimensions[0].constraintrange).toEqual([100000, 150000]);
827827
expect(gd.data[0].dimensions[1].constraintrange).not.toBeDefined();
828828
})
829-
.catch(fail)
829+
.catch(failTest)
830830
.then(done);
831831
});
832832

@@ -865,7 +865,7 @@ describe('@gl parcoords', function() {
865865
values: [1, 4]
866866
});
867867
})
868-
.catch(fail)
868+
.catch(failTest)
869869
.then(done);
870870
});
871871
});
@@ -888,7 +888,7 @@ describe('@gl parcoords', function() {
888888
expect(gd.data.length).toEqual(0);
889889
});
890890
})
891-
.catch(fail)
891+
.catch(failTest)
892892
.then(done);
893893
});
894894

@@ -922,7 +922,7 @@ describe('@gl parcoords', function() {
922922
expect(document.querySelectorAll('.y-axis').length).toEqual(0);
923923
expect(gd.data.length).toEqual(0);
924924
})
925-
.catch(fail)
925+
.catch(failTest)
926926
.then(done);
927927
});
928928

@@ -953,7 +953,7 @@ describe('@gl parcoords', function() {
953953
expect(foundPixel).toEqual(false);
954954
});
955955
})
956-
.catch(fail)
956+
.catch(failTest)
957957
.then(done);
958958
});
959959

@@ -985,7 +985,7 @@ describe('@gl parcoords', function() {
985985
expect(document.querySelectorAll('.gl-container').length).toEqual(1);
986986
expect(gd.data.length).toEqual(2);
987987
})
988-
.catch(fail)
988+
.catch(failTest)
989989
.then(done);
990990
});
991991

@@ -1012,7 +1012,7 @@ describe('@gl parcoords', function() {
10121012
expect(document.querySelectorAll('.gl-container').length).toEqual(1);
10131013
expect(gd.data.length).toEqual(2);
10141014
})
1015-
.catch(fail)
1015+
.catch(failTest)
10161016
.then(done);
10171017
});
10181018

@@ -1060,7 +1060,7 @@ describe('@gl parcoords', function() {
10601060
expect(document.querySelectorAll('.gl-container').length).toEqual(1);
10611061
expect(gd.data.length).toEqual(1);
10621062
})
1063-
.catch(fail)
1063+
.catch(failTest)
10641064
.then(done);
10651065
});
10661066
});
@@ -1087,7 +1087,7 @@ describe('@gl parcoords', function() {
10871087
height: 400,
10881088
margin: {t: 100, b: 100, l: 100, r: 100}
10891089
})
1090-
.catch(fail)
1090+
.catch(failTest)
10911091
.then(done);
10921092
});
10931093

@@ -1162,7 +1162,7 @@ describe('@gl parcoords', function() {
11621162
expect(newDashArray.split(',').length).toBe(6, newDashArray);
11631163
expect(gd.data[0].dimensions[0].constraintrange).toBeCloseTo2DArray([[0.75, 2.25], [2.75, 4]]);
11641164
})
1165-
.catch(fail)
1165+
.catch(failTest)
11661166
.then(done);
11671167
});
11681168

@@ -1205,7 +1205,7 @@ describe('@gl parcoords', function() {
12051205
// TODO: ideally this would get clipped to [0, 9]...
12061206
expect(gd.data[0].dimensions[1].constraintrange).toBeCloseToArray([-0.1020, 9]);
12071207
})
1208-
.catch(fail)
1208+
.catch(failTest)
12091209
.then(done);
12101210
});
12111211

@@ -1242,7 +1242,7 @@ describe('@gl parcoords', function() {
12421242
expect(newDashArray.split(',').length).toBe(6, newDashArray);
12431243
expect(gd.data[0].dimensions[0].constraintrange).toBeCloseTo2DArray([[0.75, 1.25], [2.75, 4]]);
12441244
})
1245-
.catch(fail)
1245+
.catch(failTest)
12461246
.then(done);
12471247
});
12481248
});

0 commit comments

Comments
 (0)