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

Investigate why WebCrypto platfrom test don't fail if we modify them for failure #4555

Open
olegbespalov opened this issue Feb 17, 2025 · 0 comments
Labels
area: webcrypto bug evaluation needed proposal needs to be validated or tested before fully implementing it in k6 tests

Comments

@olegbespalov
Copy link
Contributor

What?

Originally spotted by @McMastS in #4263 (comment)

It seems like the WebCrypto's web platform tests don't fail if we deliberately modify them for failure.

E.g. the script like

import { crypto } from "k6/experimental/webcrypto";

export default async function () {
  const key = await crypto.subtle.generateKey(
    {
      name: "Ed25519"
    },
    true,
    ["sign", "verify"]
  );

  console.log(JSON.stringify(key));
}

At that state of WebCrypto should fail since Ed25519 isn't supported, but if we uncomment it in internal/js/modules/k6/webcrypto/tests/wpt/WebCryptoAPI/generateKey/successes.js

tests still passed 🤔

We need to figure out, why this happens and apply fix if needed.

Why?

Having a working and reliable tests is essential.

@olegbespalov olegbespalov added area: webcrypto evaluation needed proposal needs to be validated or tested before fully implementing it in k6 tests labels Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: webcrypto bug evaluation needed proposal needs to be validated or tested before fully implementing it in k6 tests
Projects
None yet
Development

No branches or pull requests

1 participant