-
Notifications
You must be signed in to change notification settings - Fork 2
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
Upgrade to Chai v. 5 from Chai v. 4 #16
Comments
`% docker run --rm -v "$(pwd)"/example01/test:/app/test Puppeteer old Headless deprecation warning: ...set viewport
0 passing (17s)
...input "puppeteer" |
Hmmm, strange, that means your test is taking more than 15 seconds to run. (Timeout of 15000ms exceeded)
Please try again. Also, please try with a VPN and report what you find. |
After trying |
To reproduce:
Step 1: Understand what https://github.com/dcycle/docker-browsertesting is meant to do.
Confirm you see:
This means that we are using our dcycle/browsertesting:4 image to make sure it is possible to seach for something with Google. The actual test is here.
Once you have run your test you can see a screenshot at ./artifacts/a-screenshot.png, which shows what the test robot sees.
Step 2: Checkout the working branch
Make sure to use the working branch and not the master branch.
Step 3: Run ./ci.sh
Make sure all tests pass; you should see the same thing as our CircleCI build at https://app.circleci.com/pipelines/github/dcycle/docker-browsertesting?branch=working.
Note that there will be an exception thrown during the test. This is normal because we are testing that an exception is thrown when we are expecting one.
Step 4: Use version 5 of chai instead of version 4
In ./docker-resources/build-docker.sh, change this line:
for this one:
This has the effect of using version 5 of chai instead of version 4.
Step 5: Run ./ci.sh
Now, with version 5 of chai, you should see an error:
Remaining to do:
This seems to fail based on several instances of
const { expect } = require('chai')
in the codebase.Please read chaijs/chai#1561 and understand the change to be made in order for ./ci.sh to pass.
Because several projects use
const { expect } = require('chai')
as in the example, the pull request should:Change the 4 tag to 5 in README.md and ./scripts/rebuild.sh (for example, use dcycle/browsertesting:5 instead of dcycle/browsertesting:4 in README.md, and change:
MAJORVERSION='4'
VERSION='4.0'
to
in ./scripts/rebuild.sh).
Make sure ./ci.sh passes with all these changes. If you do not have write access to the repository, please fork it and submit a pull request.
The text was updated successfully, but these errors were encountered: