@@ -107,10 +107,12 @@ describe('constructor injection', () => {
107
107
context . bind ( 'x' ) . toClass ( XClass ) ;
108
108
context . bind ( 'y' ) . toClass ( YClass ) ;
109
109
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' ,
111
112
) ;
112
113
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' ,
114
116
) ;
115
117
} ) ;
116
118
@@ -138,13 +140,16 @@ describe('constructor injection', () => {
138
140
context . bind ( 'y' ) . toClass ( YClass ) ;
139
141
context . bind ( 'z' ) . toClass ( ZClass ) ;
140
142
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' ,
142
145
) ;
143
146
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' ,
145
149
) ;
146
150
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' ,
148
153
) ;
149
154
} ) ;
150
155
0 commit comments