Skip to content
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

Check command #4727

Open
wants to merge 8 commits into
base: 3.x
Choose a base branch
from
Open

Check command #4727

wants to merge 8 commits into from

Conversation

DavertMik
Copy link
Contributor

Created check command to quickly test config, tests, and that browser can be started and finished

This can be done locally or on CI before running tests

image

@DavertMik DavertMik requested a review from kobenguyent January 8, 2025 03:27
@kobenguyent
Copy link
Collaborator

@DavertMik what do you think if running all checks in parallel using Promise.all?
here is my local run elapsed around 1.81s compared to in sequence run around 2.3s

✔ CONFIG acceptance
✔ CONTAINER 
✔ BOOTSTRAP 
✔ TESTS Total: 47 tests
✖ HELPERS helper._init is not a function
✔ PAGE OBJECTS Total: 0 support objects
✖ HELPERS HOOKS helper._beforeSuite is not a function
✔ TYPESCRIPT DEFINITIONS 
Something went wrong. Checks didn't pass. (Total Elapsed: 1.81s)

if (!Object.values(checks).every(check => check === true)) {
output.error("Something went wrong. Checks didn't pass.")
output.print()
getMachineInfo()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing await here I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! thank you

package.json Outdated
@@ -93,7 +93,6 @@
"fn-args": "4.0.0",
"fs-extra": "11.2.0",
"glob": "^11.0.0",
"fuse.js": "^7.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got error if this lib removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, this is bad merge, right

@DavertMik
Copy link
Contributor Author

@kobenguyent good point for using Promise.all
but I think to keep things simple and traceable better to do things one by one
otherwise I think it won't be stable

@DavertMik
Copy link
Contributor Author

@kobenguyent
Copy link
Collaborator

@DavertMik I have two more things:

  • shall we add the option to specify the configuration as in the real world they would be different configurations in projects?
  • I'm curious if calling the check by default when initializing run or run-workers is bringing value?

@kobenguyent
Copy link
Collaborator

@DavertMik one more thing:

  • regarding the typescript definitions, is it possible that we read the conf file, if it's .ts then we add this check, otherwise, we shall skip this check?

checks['config'] = err
}

printCheck('config', checks['config'], config.name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about config name here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants