File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1515'use strict' ;
1616
1717var isNumeric = require ( 'fast-isnumeric' ) ;
18- var Lib = require ( '../../../src/lib' ) ;
18+ var isPlainObject = require ( '../../../src/lib/is_plain_object' ) ;
19+ var extendDeep = require ( '../../../src/lib/extend' ) . extendDeep ;
1920var deepEqual = require ( 'deep-equal' ) ;
2021
2122var matchers = {
@@ -35,7 +36,7 @@ var matchers = {
3536 for ( i = 0 ; i < x . length ; i ++ ) {
3637 x [ i ] = x [ i ] ;
3738 }
38- } else if ( Lib . isPlainObject ( x ) ) {
39+ } else if ( isPlainObject ( x ) ) {
3940 var keys = Object . keys ( x ) ;
4041 for ( i = 0 ; i < keys . length ; i ++ ) {
4142 populateUndefinedArrayEls ( x [ keys [ i ] ] ) ;
@@ -46,8 +47,8 @@ var matchers = {
4647
4748 return {
4849 compare : function ( actual , expected , msgExtra ) {
49- var actualExpanded = populateUndefinedArrayEls ( Lib . extendDeep ( { } , actual ) ) ;
50- var expectedExpanded = populateUndefinedArrayEls ( Lib . extendDeep ( { } , expected ) ) ;
50+ var actualExpanded = populateUndefinedArrayEls ( extendDeep ( { } , actual ) ) ;
51+ var expectedExpanded = populateUndefinedArrayEls ( extendDeep ( { } , expected ) ) ;
5152
5253 var passed = deepEqual ( actualExpanded , expectedExpanded ) ;
5354
Original file line number Diff line number Diff line change 11describe ( 'plotly.js + require.js' , function ( ) {
22 'use strict' ;
33
4+ // Note: this test doesn't have access to custom_matchers.js
5+ // so you can only use standard jasmine matchers here.
6+
47 it ( 'should preserve require.js globals' , function ( ) {
58 expect ( window . requirejs ) . toBeDefined ( ) ;
69 expect ( window . define ) . toBeDefined ( ) ;
Original file line number Diff line number Diff line change @@ -229,10 +229,13 @@ if(isFullSuite) {
229229} else if ( isBundleTest ) {
230230 switch ( basename ( testFileGlob ) ) {
231231 case 'requirejs' :
232- func . defaultConfig . files . push (
232+ // browserified custom_matchers doesn't work with this route
233+ // so clear them out of the files and preprocessors
234+ func . defaultConfig . files = [
233235 constants . pathToRequireJS ,
234236 constants . pathToRequireJSFixture
235- ) ;
237+ ] ;
238+ delete func . defaultConfig . preprocessors [ pathToCustomMatchers ] ;
236239 break ;
237240 case 'ie9' :
238241 // load ie9_mock.js before plotly.js+test bundle
You can’t perform that action at this time.
0 commit comments