-
Notifications
You must be signed in to change notification settings - Fork 9
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
Replacing Zombie JS with Puppeteer, remove mocha in favour of jest #1652
Conversation
e1cbc0a
to
09ef3ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paired with Tom, got the problematic tests passing. The change itself is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while I have some comments, we've had this work going on for a while and it might go on longer so let's just get it done and look to addressing things as part of the PaaS squad
@@ -71,6 +71,21 @@ Execute the unit tests to ensure everything looks good: | |||
npm test | |||
``` | |||
|
|||
Executing the acceptance tests against dev environment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this addition
acceptance-test-jest-config.json
Outdated
@@ -0,0 +1,46 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you can have much smaller config, as it only needs a config for one type of test with a specific setup.
still, it seems to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing
package.json
Outdated
@@ -55,6 +56,7 @@ | |||
"@types/passport": "^1.0.7", | |||
"@types/passport-oauth2": "^1.4.11", | |||
"@types/pino": "^6.3.9", | |||
"@types/puppeteer": "^5.4.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since v7 Puppeteer ship their own types https://github.com/puppeteer/puppeteer#usage-with-typescript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing
"nock": "^13.1.1", | ||
"nodemon-webpack-plugin": "^4.5.2", | ||
"pegjs": "^0.10.0", | ||
"pegjs-loader": "^0.5.6", | ||
"pino-pretty": "^5.1.1", | ||
"puppeteer": "^9.1.1", | ||
"request-promise-native": "^1.0.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a deprecated package, we're hoping to remove. I assume it was added to resolve failing app.test
removing that line would require a rewrite of those tests (remove use of Request)
related: jsdom/jsdom#3092
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the dependency. The refectory of app.test
should be addressed outside of this story.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, agreed that @kr8n3r 's changes could be chalked up to debt and handled in a subsequent PR. I'll capture those as issues 👌
.eslintrc
Outdated
@@ -49,7 +49,7 @@ | |||
"@typescript-eslint/ban-ts-comment": "warn", | |||
"@typescript-eslint/explicit-function-return-type": "warn", | |||
"@typescript-eslint/naming-convention": ["warn", {"selector": "interface", "format": ["PascalCase"], "custom": {"regex": "^I[A-Z]", "match": true}}], | |||
"@typescript-eslint/no-floating-promises": "error", | |||
"@typescript-eslint/no-floating-promises": "off", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I absolutely disagree with this!
This is here for a reason, as in the past, people have been experiencing a "blank page" whilst using pazmin, due to promises left hanging...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're doing gods work 👌
3734187
to
0b143a0
Compare
5ce56e5
to
4c9023f
Compare
What
How to review
To run the tests follow the section "Executing the acceptance tests against dev environment:" in the new read me.
🚨⚠️ Please do not merge this pull request via the GitHub UI ⚠️ 🚨