The number of tests for one group (say objects
) gets too large to reasonably manage in one file.
So how to break into multiple files
Just break the tests up into operations (instead of groups). But at the top of each file start with a describe('MyGroup')
This isn't great as the group 'MyGroup' gets mentioned multiple times in test explorer and test output.
Like in this example with Enumerations:
Enumerations
✓ works every time
Enumerations
When a client is not authenticated
GET /enumerations
✓ should return 200 (OK) and satisfy Metasys spec
GET /enumerations/{id}
✓ should return 200 (OK) and satisfy Metasys spec
DELETE /enumerations{id}
When I attempt to delete a custom enum
✓ should return a 401 status code (190ms)
This is likely to just get messy.
Decompose into multiple files with one "orchestration" file. This defines the top level describe and it imports all of the other tests and calls them