fxa-agent[bot] 1ae9d03a27 test(cms): add unit tests for cacheKeyForQuery
## Because

- `cacheKeyForQuery` builds the cache key for every Strapi CMS query, and no test covered it.
- `strapi.client.spec.ts` mocks the cache decorator, so its tests never call the key function.

## This pull request

- Adds `libs/shared/cms/src/lib/util.spec.ts` with 5 unit tests for `cacheKeyForQuery`.
- Tests that the key has the form `cmsQueryCache:<sha256>:<sha256>`.
- Tests that the key does not change when the variables come in a different order.
- Tests that the key changes when `locale` or `stripePlanIds` changes, and when the query changes.
- Does not change production code.

## Issue that this pull request solves

Closes:
2026-09-29 20:41:29 +00:00
2026-07-07 10:31:14 -04:00
2023-06-01 13:21:44 -07:00
2026-06-02 12:52:01 -07:00
2022-08-30 15:33:52 -04:00
2026-07-25 00:44:22 +00:00
2024-03-01 12:06:03 -08:00

Mozilla Accounts

The Mozilla Accounts (formerly Firefox Accounts, still abbreviated as fxa) monorepo

Table of Contents

Getting Started
Contributing
Documentation


Getting Started

Please read our documentation


Contributing

See the separate CONTRIBUTING.md to learn how to contribute.


Documentation

The Firefox Ecosystem Platform serves as a documentation hub for Mozilla Accounts and Subscription Platform.

S
Description
Monorepo for Firefox Accounts
Readme MPL-2.0
1.1 GiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 80.8%
JavaScript 16.5%
Fluent 1.5%
Shell 0.4%
SCSS 0.3%
Other 0.3%