[vitest-pool-workers] Add adminSecretsStore() to cloudflare:test#13073
[vitest-pool-workers] Add adminSecretsStore() to cloudflare:test#13073
adminSecretsStore() to cloudflare:test#13073Conversation
🦋 Changeset detectedLatest commit: 0782d74 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
File: Issue: Version type should be The changeset introduces a new exported helper function
Adding a new public API ( The description, code example, and markdown formatting are all good — only the version type needs to be corrected to |
|
Now I have a thorough understanding of the changes. Let me verify the interface signatures match the actual implementation: Looking at the miniflare implementation in
Everything looks correct. The LGTM |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
Secrets store bindings only expose .get(), so there was no way to seed values in vitest-pool-workers tests. This exposes Miniflare's admin API through a new cloudflare:test import, giving tests create/update/delete access. Fixes #12778
3a466de to
fb8cbd1
Compare
… coverage - Export SECRETS_STORE_ADMIN_API constant and SecretsStoreSecretAdmin interface from miniflare instead of duplicating them - Import ADMIN_API from miniflare source (same pattern as devalue import) - Import SecretsStoreSecretAdmin type from miniflare - Exercise create, update, list, and delete in the test
|
Codeowners approval required for this PR:
Show detailed file reviewers |
Fixes #12778.
Secrets store bindings only expose a read-only
.get()method, so there was previously no way to seed secret values from within a test. This addsadminSecretsStore()tocloudflare:test— a thin wrapper that returns Miniflare's existing admin API for a secrets store binding, giving tests full control over create/update/delete operations.adminSecretsStore()incloudflare:testfor vitest-pool-workers cloudflare-docs#29388