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

mocha-utils defaultBrowserOptions don't take values from mocha config into account #6500

Closed
whimboo opened this issue Oct 9, 2020 · 7 comments

Comments

@whimboo
Copy link
Collaborator

whimboo commented Oct 9, 2020

When running the Puppeteer unit tests we currently have setup a timeout of 25s when connecting to Firefox. Sadly these values are not taking into account by mocha-utils.

As result some of the tests in browser.spec.ts are failing because these depend on a non set custom timeout value from the config.

@mathiasbynens or @jackfranklin is that something you could fix? I would kinda appreciate that. I don't see a reason why the default config values shouldn't be used here. Thanks!

@stale
Copy link

stale bot commented Jun 25, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 25, 2022
@whimboo
Copy link
Collaborator Author

whimboo commented Jun 27, 2022

Not sure if this issue is still valid or not. The location of both files have been changed and I cannot see where the default settings from .mocharc.cjs are actually used. @OrKoN maybe you have a pointer or idea?

@stale stale bot removed the unconfirmed label Jun 27, 2022
@OrKoN
Copy link
Collaborator

OrKoN commented Jun 28, 2022

There is .mocharc.cjs and test/src/mocha-utils.ts now. Could you see if this still reproduces? I have been running Firefox tests for refactoring recently and have not noticed anything unusual.

@whimboo
Copy link
Collaborator Author

whimboo commented Jul 5, 2022

I actually miss the connection between defined constants in the .mocharc.cjs file and where these are used? Eg. for the timeout of 25s I still cannot find a line of code where it is used for the browser startup. Could you maybe point me to that?

@OrKoN
Copy link
Collaborator

OrKoN commented Jul 5, 2022

@whimboo I believe the file is imported by mocha via yargs package directly and the value of timeout because an option for the Mocha constructor.

@OrKoN
Copy link
Collaborator

OrKoN commented Jul 5, 2022

i.e., I don't think it's used for the browser setup in any way. It's only used to configure Mocha: a test would be considered timed out if it does not resolve within 25 sec.

@whimboo
Copy link
Collaborator Author

whimboo commented Jul 13, 2022

Ok, so maybe that was an issue with the former puppeteer-unit-tests.js mocha config file then. Given that quite some time has been passed since the issue was filed I cannot fully remember. And with a single config file now the problem might no longer exist. I would suggest to close the issue.

@whimboo whimboo closed this as completed Jul 13, 2022
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

No branches or pull requests

2 participants