File tree 3 files changed +13
-6
lines changed
3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 15
15
'use strict' ;
16
16
17
17
var 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 ;
19
20
var deepEqual = require ( 'deep-equal' ) ;
20
21
21
22
var matchers = {
@@ -35,7 +36,7 @@ var matchers = {
35
36
for ( i = 0 ; i < x . length ; i ++ ) {
36
37
x [ i ] = x [ i ] ;
37
38
}
38
- } else if ( Lib . isPlainObject ( x ) ) {
39
+ } else if ( isPlainObject ( x ) ) {
39
40
var keys = Object . keys ( x ) ;
40
41
for ( i = 0 ; i < keys . length ; i ++ ) {
41
42
populateUndefinedArrayEls ( x [ keys [ i ] ] ) ;
@@ -46,8 +47,8 @@ var matchers = {
46
47
47
48
return {
48
49
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 ) ) ;
51
52
52
53
var passed = deepEqual ( actualExpanded , expectedExpanded ) ;
53
54
Original file line number Diff line number Diff line change 1
1
describe ( 'plotly.js + require.js' , function ( ) {
2
2
'use strict' ;
3
3
4
+ // Note: this test doesn't have access to custom_matchers.js
5
+ // so you can only use standard jasmine matchers here.
6
+
4
7
it ( 'should preserve require.js globals' , function ( ) {
5
8
expect ( window . requirejs ) . toBeDefined ( ) ;
6
9
expect ( window . define ) . toBeDefined ( ) ;
Original file line number Diff line number Diff line change @@ -229,10 +229,13 @@ if(isFullSuite) {
229
229
} else if ( isBundleTest ) {
230
230
switch ( basename ( testFileGlob ) ) {
231
231
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 = [
233
235
constants . pathToRequireJS ,
234
236
constants . pathToRequireJSFixture
235
- ) ;
237
+ ] ;
238
+ delete func . defaultConfig . preprocessors [ pathToCustomMatchers ] ;
236
239
break ;
237
240
case 'ie9' :
238
241
// load ie9_mock.js before plotly.js+test bundle
You can’t perform that action at this time.
0 commit comments