File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed
Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -452,10 +452,6 @@ define(function(require) {
452452 function resolveDeepName ( name , scope ) {
453453 var parts = name . split ( '.' ) ;
454454
455- if ( parts . length > 2 ) {
456- return when . reject ( new Error ( 'Only 1 "." is allowed in refs: ' + name ) ) ;
457- }
458-
459455 return when . reduce ( parts , function ( scope , segment ) {
460456 return segment in scope
461457 ? scope [ segment ]
Original file line number Diff line number Diff line change @@ -156,26 +156,16 @@ buster.testCase('refs', {
156156 ) ;
157157 } ,
158158
159- 'should allow 1 level of dot traversal for nested references' : function ( ) {
159+ 'should allow dot traversal for nested references' : function ( ) {
160160 return wire ( {
161- a : { b : true } ,
162- success : { $ref : 'a.b' }
161+ a : { b : { c : true } } ,
162+ success : { $ref : 'a.b.c ' }
163163 } ) . then (
164164 function ( context ) {
165165 assert ( context . success ) ;
166166 } ,
167167 fail
168168 ) ;
169- } ,
170-
171- 'should not allow > 1 level of dot traversal' : function ( ) {
172- return wire ( {
173- a : { b : { c : true } } ,
174- success : { $ref : 'a.b.c' }
175- } ) . then (
176- fail ,
177- function ( ) { assert ( true ) ; }
178- ) ;
179169 }
180170
181171} ) ;
You can’t perform that action at this time.
0 commit comments