Add unit tests for annotation templates service#61
Add unit tests for annotation templates service#61ElMaxter99 wants to merge 4 commits intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function overrideLocalStorage(value: Storage | undefined) { | ||
| Object.defineProperty(window, 'localStorage', { | ||
| configurable: true, | ||
| value, | ||
| }); |
There was a problem hiding this comment.
Avoid redefining window.localStorage via Object.defineProperty
The tests stub window.localStorage by redefining the property with Object.defineProperty. In real browsers (including ChromeHeadless used in CI) the localStorage attribute is non‑configurable, so this call throws TypeError: Cannot redefine property: localStorage before the suite even runs. As written, the new tests will fail in CI. Consider using spyOnProperty(window, 'localStorage', 'get') or another mechanism that does not attempt to redefine the built‑in property.
Useful? React with 👍 / 👎.
|
Descarto agregar CI / CD hasta q tenga una versión mas duradera del proyecto |
Summary
Testing