Skip to content

Refactor crypto_test.go #4268

@olegbespalov

Description

@olegbespalov

What?

The original implementation of the WebCrypto API kept static Deplatform tests in the repository. That's approach was fine for the beginning, but less maintainable since we weren't able easily to answer the question of what's the difference between our version and original version of the test case from the web platform test suite.

Likely in grafana/xk6-webcrypto#87 and grafana/xk6-webcrypto#90 we adjusted that and started to use original suite of tests, with the patches applied on top of it, but that was done only for subtle_crypto_test.go. crypto_test.go still have static versions of the tests.

It's probably good to do align crypto_test.go and run the tests against the web platform tests, rather the static versions.

Why?

Running tests against WebPlatfrom test suite guaranties that our implementation compliant with the WebCrypto API specs, and if there are some differences we could easily store them as patches which makes it more transparent for our customers.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions