@@ -107,10 +107,12 @@ describe('constructor injection', () => {
107107 context . bind ( 'x' ) . toClass ( XClass ) ;
108108 context . bind ( 'y' ) . toClass ( YClass ) ;
109109 expect ( ( ) => context . getSync ( 'x' ) ) . to . throw (
110- "Circular dependency detected on path 'x --> y --> x'" ,
110+ 'Circular dependency detected: x --> @XClass.prototype.y ' +
111+ '--> y --> @YClass.prototype.x --> x' ,
111112 ) ;
112113 expect ( ( ) => context . getSync ( 'y' ) ) . to . throw (
113- "Circular dependency detected on path 'y --> x --> y'" ,
114+ 'Circular dependency detected: y --> @YClass.prototype.x ' +
115+ '--> x --> @XClass.prototype.y --> y' ,
114116 ) ;
115117 } ) ;
116118
@@ -138,13 +140,16 @@ describe('constructor injection', () => {
138140 context . bind ( 'y' ) . toClass ( YClass ) ;
139141 context . bind ( 'z' ) . toClass ( ZClass ) ;
140142 expect ( ( ) => context . getSync ( 'x' ) ) . to . throw (
141- "Circular dependency detected on path 'x --> y --> z --> x'" ,
143+ 'Circular dependency detected: x --> @XClass.constructor[0] --> y ' +
144+ '--> @YClass.constructor[0] --> z --> @ZClass.constructor[0] --> x' ,
142145 ) ;
143146 expect ( ( ) => context . getSync ( 'y' ) ) . to . throw (
144- "Circular dependency detected on path 'y --> z --> x --> y'" ,
147+ 'Circular dependency detected: y --> @YClass.constructor[0] --> z ' +
148+ '--> @ZClass.constructor[0] --> x --> @XClass.constructor[0] --> y' ,
145149 ) ;
146150 expect ( ( ) => context . getSync ( 'z' ) ) . to . throw (
147- "Circular dependency detected on path 'z --> x --> y --> z'" ,
151+ 'Circular dependency detected: z --> @ZClass.constructor[0] --> x ' +
152+ '--> @XClass.constructor[0] --> y --> @YClass.constructor[0] --> z' ,
148153 ) ;
149154 } ) ;
150155
0 commit comments