@@ -10,9 +10,7 @@ var Axes = require('@src/plots/cartesian/axes');
10
10
var createGraphDiv = require ( '../assets/create_graph_div' ) ;
11
11
var destroyGraphDiv = require ( '../assets/destroy_graph_div' ) ;
12
12
var fail = require ( '../assets/fail_test' ) ;
13
- var customMatchers = require ( '../assets/custom_matchers' ) ;
14
13
var checkTicks = require ( '../assets/custom_assertions' ) . checkTicks ;
15
- var negateIf = require ( '../assets/negate_if' ) ;
16
14
17
15
var d3 = require ( 'd3' ) ;
18
16
@@ -154,10 +152,6 @@ describe('Bar.supplyDefaults', function() {
154
152
describe ( 'bar calc / setPositions' , function ( ) {
155
153
'use strict' ;
156
154
157
- beforeAll ( function ( ) {
158
- jasmine . addMatchers ( customMatchers ) ;
159
- } ) ;
160
-
161
155
it ( 'should fill in calc pt fields (stack case)' , function ( ) {
162
156
var gd = mockBarPlot ( [ {
163
157
y : [ 2 , 1 , 2 ]
@@ -269,10 +263,6 @@ describe('bar calc / setPositions', function() {
269
263
describe ( 'Bar.calc' , function ( ) {
270
264
'use strict' ;
271
265
272
- beforeAll ( function ( ) {
273
- jasmine . addMatchers ( customMatchers ) ;
274
- } ) ;
275
-
276
266
it ( 'should guard against invalid base items' , function ( ) {
277
267
var gd = mockBarPlot ( [ {
278
268
base : [ null , 1 , 2 ] ,
@@ -328,10 +318,6 @@ describe('Bar.calc', function() {
328
318
describe ( 'Bar.setPositions' , function ( ) {
329
319
'use strict' ;
330
320
331
- beforeAll ( function ( ) {
332
- jasmine . addMatchers ( customMatchers ) ;
333
- } ) ;
334
-
335
321
it ( 'should guard against invalid offset items' , function ( ) {
336
322
var gd = mockBarPlot ( [ {
337
323
offset : [ null , 0 , 1 ] ,
@@ -768,10 +754,6 @@ describe('A bar plot', function() {
768
754
769
755
var gd ;
770
756
771
- beforeAll ( function ( ) {
772
- jasmine . addMatchers ( customMatchers ) ;
773
- } ) ;
774
-
775
757
beforeEach ( function ( ) {
776
758
gd = createGraphDiv ( ) ;
777
759
} ) ;
@@ -1205,7 +1187,7 @@ describe('A bar plot', function() {
1205
1187
if ( ! i ) return ;
1206
1188
var bbox = this . getBoundingClientRect ( ) ;
1207
1189
[ 'left' , 'right' , 'top' , 'bottom' , 'width' , 'height' ] . forEach ( function ( dim ) {
1208
- negateIf ( expect ( bbox [ dim ] ) , dims . indexOf ( dim ) === - 1 )
1190
+ expect ( bbox [ dim ] ) . negateIf ( dims . indexOf ( dim ) === - 1 )
1209
1191
. toBeWithin ( bbox1 [ dim ] , 0.1 , msg + ' (' + i + '): ' + dim ) ;
1210
1192
} ) ;
1211
1193
} ) ;
@@ -1269,10 +1251,6 @@ describe('bar hover', function() {
1269
1251
1270
1252
var gd ;
1271
1253
1272
- beforeAll ( function ( ) {
1273
- jasmine . addMatchers ( customMatchers ) ;
1274
- } ) ;
1275
-
1276
1254
afterEach ( destroyGraphDiv ) ;
1277
1255
1278
1256
function getPointData ( gd ) {
@@ -1532,17 +1510,13 @@ function mockBarPlot(dataWithoutTraceType, layout) {
1532
1510
}
1533
1511
1534
1512
function assertArrayField ( calcData , prop , expectation ) {
1535
- // Note that this functions requires to add `customMatchers` to jasmine
1536
- // matchers; i.e: `jasmine.addMatchers(customMatchers);`.
1537
1513
var values = Lib . nestedProperty ( calcData , prop ) . get ( ) ;
1538
1514
if ( ! Array . isArray ( values ) ) values = [ values ] ;
1539
1515
1540
1516
expect ( values ) . toBeCloseToArray ( expectation , undefined , '(field ' + prop + ')' ) ;
1541
1517
}
1542
1518
1543
1519
function assertPointField ( calcData , prop , expectation ) {
1544
- // Note that this functions requires to add `customMatchers` to jasmine
1545
- // matchers; i.e: `jasmine.addMatchers(customMatchers);`.
1546
1520
var values = [ ] ;
1547
1521
1548
1522
calcData . forEach ( function ( calcTrace ) {
@@ -1557,8 +1531,6 @@ function assertPointField(calcData, prop, expectation) {
1557
1531
}
1558
1532
1559
1533
function assertTraceField ( calcData , prop , expectation ) {
1560
- // Note that this functions requires to add `customMatchers` to jasmine
1561
- // matchers; i.e: `jasmine.addMatchers(customMatchers);`.
1562
1534
var values = calcData . map ( function ( calcTrace ) {
1563
1535
return Lib . nestedProperty ( calcTrace [ 0 ] , prop ) . get ( ) ;
1564
1536
} ) ;
0 commit comments