Skip to content

test: colocate tests as src/**/*.spec.ts - #96

Merged
donskov merged 1 commit into
masterfrom
donskov/webcrypto-3-test
Oct 27, 2026
Merged

donskov merged 1 commit into
masterfrom
donskov/webcrypto-3-test

Conversation

@donskov

@donskov donskov commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #95 (part 3 of 7 for @peculiar/webcrypto 2.0.0; merge in order).

Splits test/crypto.ts into specs next to the mechanisms (src/mechs/{ec,hkdf,hmac,ed,ed25519,sha,shake,rsa}/*.spec.ts), src/crypto.spec.ts, and src/webcrypto-test.spec.ts for the shared @peculiar/webcrypto-test suite. vitest.config.ts from pvtsutils (no globals; describe/it are passed to WebcryptoTest.check). Same 232 tests. @peculiar/webcrypto-test 2.0.0 depends only on pvtsutils and tslib, so it does not pull a second webcrypto-core or json-schema.

@donskov
donskov force-pushed the donskov/webcrypto-2-style branch from 29af998 to 27e85fa Compare October 27, 2026 10:01
Base automatically changed from donskov/webcrypto-2-style to master October 27, 2026 10:03
Split test/crypto.ts into specs next to the mechanisms they cover
(ec, hkdf, hmac, ed, ed25519, sha, shake, rsa) plus src/crypto.spec.ts
for getRandomValues. The shared @peculiar/webcrypto-test suite runs
from src/webcrypto-test.spec.ts.

Copy vitest.config.ts from pvtsutils (src/**/*.spec.ts, no globals):
specs import describe/it from vitest and pass them to WebcryptoTest.
Drop the Node < 14 skips and rename the second "shake128" block, which
tests shake256. Same 232 tests as before.
@donskov
donskov force-pushed the donskov/webcrypto-3-test branch from 107f5cc to 4f8379b Compare October 27, 2026 10:03
@donskov donskov self-assigned this Oct 27, 2026
@donskov
donskov merged commit 4addee7 into master Oct 27, 2026
2 checks passed
@donskov
donskov deleted the donskov/webcrypto-3-test branch October 27, 2026 10:35
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.

1 participant