Share the workerd MD5 test shim

Open Beginner friendly
#2,679 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
bun, typescript
Domain
cli, testing

Research direction

Read backend/test/s3-fetch-no-cache.test.ts and test/helpers/repull-pr-world.ts around line 253 to compare the two shims. Find the shared test helper conventions, move withWorkerdMd5 into a helper under backend/test/helpers/, and update both callers. Done means both tests use the shared helper and behavior stays unchanged.

Written by the indexing model from the issue text.

Description

Found in review of #2678 (#2656), in test code that PR does not own.

backend/test/s3-fetch-no-cache.test.ts lends crypto.subtle an MD5 digest through node:crypto for one call, because Bun lacks MD5 and lockObjectKeys computes one before its HEAD. The shim is a copy of withWorkerdMd5 in test/helpers/repull-pr-world.ts (around line 253). The two copies can drift.

Proposed: move withWorkerdMd5 to one shared test helper (for example under backend/test/helpers/) and use it from both files. No behavior change.

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
4h 48m
Merged PRs (30d)
468

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nemarOrg/nemar-cli

All issues in nemarOrg/nemar-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.