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

Web Platform Tests part 2 #90

Merged
merged 5 commits into from
Oct 28, 2024
Merged

Web Platform Tests part 2 #90

merged 5 commits into from
Oct 28, 2024

Conversation

olegbespalov
Copy link
Contributor

What?

This primarily applies suggestions that @mstoykov made in #87.

It also moves tests around, and the reason is to have the chance to test suites separately in CI (before the PR, we run the regular tests twice)

Why?

This simplifies the maintenance of the tests and improves the developer's UX.

@olegbespalov olegbespalov self-assigned this Oct 25, 2024
@olegbespalov olegbespalov requested a review from a team as a code owner October 25, 2024 17:02
@olegbespalov olegbespalov requested review from mstoykov and joanlopez and removed request for a team October 25, 2024 17:02
@olegbespalov
Copy link
Contributor Author

Also @mstoykov huge thanks for the suggestion about the approach, and @joanlopez, for the implementation that I used as the base, I really love how now everything is structured 😍

@olegbespalov olegbespalov mentioned this pull request Oct 25, 2024
@olegbespalov olegbespalov force-pushed the feat/wpt-part-2 branch 2 times, most recently from 3b7a584 to ee44ef6 Compare October 28, 2024 08:15
Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I left two blocking comments that we can stream line it even more.

webcrypto/tests/util/overloads.js Outdated Show resolved Hide resolved
Comment on lines 91 to 93
function assert_unreached(description) {
throw `reached unreachable code, reason: ${description}`
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this "adaptation" ? can we have a diff for it as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, it's something from the original implementation which probably should cover this, let me check quickly if it can be dropped

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, quickly checking, I think we need this 😢 It's the only place where it's defining, keeping in mind that we don't fully rely on the original testharness.js and helpers.js

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but the questions is more "can we just really on the original ones?"

Or can we have diff patch against the original ones (like we have for the tests) and run them patched instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, yes. Not sure, though, if it's just a simple replacement. Perhaps if it was possible, we started to use them at the moment of beginning the webcrypto. How about opening a separate issue? Ideally, we should use the original test framework as much as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, after re-looking to streams, it seems like it's not a big deal, so I applied the fixed. It removes the need to any overload (even if test time increased a bit 🤔 )

@olegbespalov olegbespalov requested a review from mstoykov October 28, 2024 09:50
@olegbespalov olegbespalov merged commit bd6376d into main Oct 28, 2024
11 checks passed
@olegbespalov olegbespalov deleted the feat/wpt-part-2 branch October 28, 2024 10:19
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