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 11/**
2- * Copyright © Magento, Inc. All rights reserved.
3- * See COPYING.txt for license details .
2+ * Copyright 2019 Adobe
3+ * All Rights Reserved .
44 */
55
66/* eslint max-nested-callbacks: 0 */
@@ -15,6 +15,19 @@ require.config({
1515define ( [ 'rjsResolver' , 'mixins' ] , function ( resolver , mixins ) {
1616 'use strict' ;
1717
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+
1831 describe ( 'mixins module' , function ( ) {
1932 beforeEach ( function ( done ) {
2033 spyOn ( mixins , 'hasMixins' ) . and . callThrough ( ) ;
Original file line number Diff line number Diff line change 11/**
2- * Copyright © Magento, Inc. All rights reserved.
3- * See COPYING.txt for license details .
2+ * Copyright 2015 Adobe
3+ * All Rights Reserved .
44 */
55define ( 'mixins' , [
66 'module'
@@ -222,6 +222,8 @@ require([
222222 return originalContextRequire ( deps , callback , errback ) ;
223223 } ;
224224
225+ unbundledContext . nameToUrl = defContext . nameToUrl ;
226+
225227 /**
226228 * Wrap original context configuration to update unbundled context,
227229 * 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