8000 Tests are running in an inconsistent order · Issue #1 · gingerchew/lutes · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tests are running in an inconsistent order #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gingerchew opened this issue Dec 4, 2024 · 3 comments
Open

Tests are running in an inconsistent order #1

gingerchew opened this issue Dec 4, 2024 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@gingerchew
Copy link
Owner

image

expect().toHaveLength() does not seem to report properly.

@gingerchew
Copy link
Owner Author

Can confirm this is the same with toContain could this be because of how the error_msg string is passed along? There should be a better way of doing that then that isn't writing a thousand error() calls. For now, replacing with the error() calls.

@gingerchew
Copy link
Owner Author

Swapping to multiple error calls in a function fixed toContain but toHaveLength still doesn't report properly

@gingerchew gingerchew added bug Something isn't working help wanted Extra attention is needed labels Dec 4, 2024
@gingerchew
Copy link
Owner Author

The way describe works is basically this:

1. describe creates a table
2. describe creates a function to pass to load the table with test callbacks
3. describe runs the passed callback to collect all the test callbacks
4. for each test message in the table run the matching test function and save the result
5. format the start of the message with the title passed to describe
6. print the full message

Assuming that the desc_fn callback runs from top to bottom, it should be in that order.

For whatever reason, each run can have a different order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant
0