@@ -203,7 +203,7 @@ Feature: Custom context objects
203203 And the output contains "The state is 'initial value'"
204204 And the output contains "The state is 'step value'"
205205
206- Scenario : Circular dependencies are explicitly communicated to the developer
206+ Scenario : Cyclic imports are detected and communicated to the developer
207207 Given a file named "features/a.feature" with:
208208 """feature
209209 Feature: some feature
@@ -276,11 +276,11 @@ Feature: Custom context objects
276276 Then it fails
277277 And the error output contains text:
278278 """
279- Undefined context type at index 0 for StateOne, do you possibly have a circular dependency?
279+ Error: Undefined dependency detected in StateOne. You possibly have an import cycle.
280+ See https://nodejs.org/api/modules.html#modules_cycles
280281 """
281282
282-
283- Scenario : Circular dependencies within the same file are vaguely communicated to the developer
283+ Scenario : Cyclic state dependencies are detected and communicated to the developer
284284 Given a file named "features/a.feature" with:
285285 """feature
286286 Feature: some feature
@@ -346,10 +346,10 @@ Feature: Custom context objects
346346 Then it fails
347347 And the error output contains text:
348348 """
349- Undefined context type at index 0 for StepsTwo, do you possibly have a circular dependency?
349+ Error: Cyclic dependency detected: StateOne -> StateTwo -> StateOne
350350 """
351351
352- Scenario : In -file circular dependencies are thrown as maximum call stack exceeded errors
352+ Scenario : Cyclic single -file state dependencies are detected and communicated to the developer
353353 Given a file named "features/a.feature" with:
354354 """feature
355355 Feature: some feature
@@ -401,4 +401,7 @@ Feature: Custom context objects
401401 """
402402 When I run cucumber-js
403403 Then it fails
404- And the output contains "RangeError: Maximum call stack size exceeded"
404+ And the error output contains text:
405+ """
406+ Error: Cyclic dependency detected: StateOne -> StateTwo -> StateOne
407+ """
0 commit comments