@@ -10,9 +10,7 @@ var Axes = require('@src/plots/cartesian/axes');
1010var createGraphDiv = require ( '../assets/create_graph_div' ) ;
1111var destroyGraphDiv = require ( '../assets/destroy_graph_div' ) ;
1212var fail = require ( '../assets/fail_test' ) ;
13- var customMatchers = require ( '../assets/custom_matchers' ) ;
1413var checkTicks = require ( '../assets/custom_assertions' ) . checkTicks ;
15- var negateIf = require ( '../assets/negate_if' ) ;
1614
1715var d3 = require ( 'd3' ) ;
1816
@@ -154,10 +152,6 @@ describe('Bar.supplyDefaults', function() {
154152describe ( 'bar calc / setPositions' , function ( ) {
155153 'use strict' ;
156154
157- beforeAll ( function ( ) {
158- jasmine . addMatchers ( customMatchers ) ;
159- } ) ;
160-
161155 it ( 'should fill in calc pt fields (stack case)' , function ( ) {
162156 var gd = mockBarPlot ( [ {
163157 y : [ 2 , 1 , 2 ]
@@ -269,10 +263,6 @@ describe('bar calc / setPositions', function() {
269263describe ( 'Bar.calc' , function ( ) {
270264 'use strict' ;
271265
272- beforeAll ( function ( ) {
273- jasmine . addMatchers ( customMatchers ) ;
274- } ) ;
275-
276266 it ( 'should guard against invalid base items' , function ( ) {
277267 var gd = mockBarPlot ( [ {
278268 base : [ null , 1 , 2 ] ,
@@ -328,10 +318,6 @@ describe('Bar.calc', function() {
328318describe ( 'Bar.setPositions' , function ( ) {
329319 'use strict' ;
330320
331- beforeAll ( function ( ) {
332- jasmine . addMatchers ( customMatchers ) ;
333- } ) ;
334-
335321 it ( 'should guard against invalid offset items' , function ( ) {
336322 var gd = mockBarPlot ( [ {
337323 offset : [ null , 0 , 1 ] ,
@@ -768,10 +754,6 @@ describe('A bar plot', function() {
768754
769755 var gd ;
770756
771- beforeAll ( function ( ) {
772- jasmine . addMatchers ( customMatchers ) ;
773- } ) ;
774-
775757 beforeEach ( function ( ) {
776758 gd = createGraphDiv ( ) ;
777759 } ) ;
@@ -1205,7 +1187,7 @@ describe('A bar plot', function() {
12051187 if ( ! i ) return ;
12061188 var bbox = this . getBoundingClientRect ( ) ;
12071189 [ '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 )
12091191 . toBeWithin ( bbox1 [ dim ] , 0.1 , msg + ' (' + i + '): ' + dim ) ;
12101192 } ) ;
12111193 } ) ;
@@ -1269,10 +1251,6 @@ describe('bar hover', function() {
12691251
12701252 var gd ;
12711253
1272- beforeAll ( function ( ) {
1273- jasmine . addMatchers ( customMatchers ) ;
1274- } ) ;
1275-
12761254 afterEach ( destroyGraphDiv ) ;
12771255
12781256 function getPointData ( gd ) {
@@ -1532,17 +1510,13 @@ function mockBarPlot(dataWithoutTraceType, layout) {
15321510}
15331511
15341512function assertArrayField ( calcData , prop , expectation ) {
1535- // Note that this functions requires to add `customMatchers` to jasmine
1536- // matchers; i.e: `jasmine.addMatchers(customMatchers);`.
15371513 var values = Lib . nestedProperty ( calcData , prop ) . get ( ) ;
15381514 if ( ! Array . isArray ( values ) ) values = [ values ] ;
15391515
15401516 expect ( values ) . toBeCloseToArray ( expectation , undefined , '(field ' + prop + ')' ) ;
15411517}
15421518
15431519function assertPointField ( calcData , prop , expectation ) {
1544- // Note that this functions requires to add `customMatchers` to jasmine
1545- // matchers; i.e: `jasmine.addMatchers(customMatchers);`.
15461520 var values = [ ] ;
15471521
15481522 calcData . forEach ( function ( calcTrace ) {
@@ -1557,8 +1531,6 @@ function assertPointField(calcData, prop, expectation) {
15571531}
15581532
15591533function assertTraceField ( calcData , prop , expectation ) {
1560- // Note that this functions requires to add `customMatchers` to jasmine
1561- // matchers; i.e: `jasmine.addMatchers(customMatchers);`.
15621534 var values = calcData . map ( function ( calcTrace ) {
15631535 return Lib . nestedProperty ( calcTrace [ 0 ] , prop ) . get ( ) ;
15641536 } ) ;
0 commit comments