Skip to content

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

"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?

@DavertMik
Copy link
Contributor Author

@kobenguyent

shall we add the option to specify the configuration as in the real world they would be different configurations in projects?

yes, I added it as -c --config

I'm curious if calling the check by default when initializing run or run-workers is bringing value?

For run - no, as you probably use it for development

For run-workers - may be

But anyway, I think check to be CI command that you can have as a precondition step

@DavertMik DavertMik merged commit 4a1f385 into 3.x Jan 9, 2025
12 checks passed
@DavertMik DavertMik deleted the feat/check-command branch January 9, 2025 20:48
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.

3 participants