File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
dev/tests/js/jasmine/tests/lib/mage/requirejs Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
- * Copyright © Magento, Inc. All rights reserved.
3
- * See COPYING.txt for license details .
2
+ * Copyright 2019 Adobe
3
+ * All Rights Reserved .
4
4
*/
5
5
6
6
/* eslint max-nested-callbacks: 0 */
@@ -15,6 +15,19 @@ require.config({
15
15
define ( [ 'rjsResolver' , 'mixins' ] , function ( resolver , mixins ) {
16
16
'use strict' ;
17
17
18
+ describe ( 'mixins.js context behavior' , function ( ) {
19
+ var defContext , unbundledContext ;
20
+
21
+ beforeEach ( function ( ) {
22
+ defContext = require . s . contexts . _ ;
23
+ unbundledContext = require . s . contexts . $ ;
24
+ } ) ;
25
+
26
+ it ( 'should copy nameToUrl from default context to unbundled context' , function ( ) {
27
+ expect ( unbundledContext . nameToUrl ) . toBe ( defContext . nameToUrl ) ;
28
+ } ) ;
29
+ } ) ;
30
+
18
31
describe ( 'mixins module' , function ( ) {
19
32
beforeEach ( function ( done ) {
20
33
spyOn ( mixins , 'hasMixins' ) . and . callThrough ( ) ;
Original file line number Diff line number Diff line change 1
1
/**
2
- * Copyright © Magento, Inc. All rights reserved.
3
- * See COPYING.txt for license details .
2
+ * Copyright 2015 Adobe
3
+ * All Rights Reserved .
4
4
*/
5
5
define ( 'mixins' , [
6
6
'module'
@@ -222,6 +222,8 @@ require([
222
222
return originalContextRequire ( deps , callback , errback ) ;
223
223
} ;
224
224
225
+ unbundledContext . nameToUrl = defContext . nameToUrl ;
226
+
225
227
/**
226
228
* Wrap original context configuration to update unbundled context,
227
229
* that way it is able to respect any changes done after mixins module has initialized.
You can’t perform that action at this time.
0 commit comments