mirror of
https://github.com/mozilla/fxa.git
synced 2026-10-12 21:49:51 +02:00
agent-8a375d
## 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:
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.
Languages
TypeScript
80.8%
JavaScript
16.5%
Fluent
1.5%
Shell
0.4%
SCSS
0.3%
Other
0.3%