Passing false will to disable circular data loading, causing test to complete after 1 loop of test data.
but when running the code, it will just loop while printing "Test data exhausted, consider making it circular?" indefinitely when the data is exhausted.
Describe the bug
According to the documentation of
circular
: https://element.flood.io/docs/api/test-data#testdatasourcebut when running the code, it will just loop while printing "Test data exhausted, consider making it circular?" indefinitely when the data is exhausted.
The behavior can be traced here: https://github.com/flood-io/element/blob/1c95ba6a5dfdd3c5e3d4ef6b7cf6fc41d991e1ac/packages/core/src/runtime/Test.ts#L195
To Reproduce
run the code in this section: https://element.flood.io/docs/api/test-data#testdatasource with sample data.
Expected behavior
The test will iterate through all the data in the test data and halt (i.e. complete).
Additional context
The documented behavior is needed in cases where tests simply requires going through all the data in the list once.