-
Notifications
You must be signed in to change notification settings - Fork 182
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
Replace bower packages with corresponding unpkg URLs #434
Replace bower packages with corresponding unpkg URLs #434
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
The pull request #434 has too many files changed.
We can only review pull requests with up to 300 changed files, and this pull request has 577.
@voidCounter Really great work here, and thank you for updating the tests as well! The failing test is a CORS issue due to accessing remote files without running the site through a server. The proper fix is starting a webserver in the test, similar to what happens with I’ve marked the areas to address this in the diff below: diff --git a/test/demo.js b/test/demo.js
index 077feba..d528be5 100644
--- a/test/demo.js
+++ b/test/demo.js
@@ -23,6 +23,7 @@ const demos = [
(async () => {
before(async function() {
+ // TODO: serve site via server here
global.browser = global.browser || await puppeteer.launch();
});
@@ -68,5 +69,8 @@ const demos = [
});
});
- after(async () => browser.close());
+ after(async () => {
+ // TODO: close server here
+ browser.close();
+ });
})();
\ No newline at end of file
|
@shakeelmohamed Thank you! Will work on this. |
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.
Great work and thanks for the fast turnaround! I’m okay with the test warnings, let’s address some of these minor things and we will be good to merge.
package.json
Outdated
@@ -11,7 +11,7 @@ | |||
"stylelint:css": "stylelint css/*.css", | |||
"lint": "npm run lint:js && npm run lint:html && npm run lint:css && npm run lint:tests", | |||
"pretest": "npm run stylelint:css && npm run lint", | |||
"test": "mocha", | |||
"test": "mocha --timeout 10000", |
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 believe this is a per-test limit, and 10000ms or 10s seems very high.
We’re really only concered with the demo test, what runtime are you getting for that test?
The runtimes don’t seem that high but I agree the 2000ms default is low, 5000ms seems like a reasonable compromise.
Github actions runtime: 1429ms
Local runtime for me: 1211ms
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'm getting around 2000-4000ms for this test. Another solution could be to increase the timeout for the demo.test
as other tests work fine within 2000ms.
describe("Demo", async function() {
// set timeout for this test
this.timeout(TEST_TIMEOUT);
// ....
@voidCounter Approved and merged, really great work here! Thank you for going through multiple rounds of feedback and for some additional considerations. I would love to see future contributions from you if you’re interested. |
@shakeelmohamed Thank you so much for your guidance throughout the commits! Learned a lot. |
Context
Closes #432
Description
This PR includes the following changes:
test/page_structure.js
to support these changes.Checklist
Issues
I'm currently facing one or two test failures related to the timeout of the "Demo" and "Form" tests. Here's the error message for the "Demo" test: