mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-24 15:22:20 +10:00
fix(review): restore cookie attrs + color fallback, drop stale knip entry
Code-review findings: - donation-toast: restore path/secure/sameSite cookie attributes the inlined useCookie dropped (security/scope regression). - utils/color: restore @uiw fallback so percentage-notation rgb() still converts (custom style-rule colors are arbitrary strings); add tests pinning the one real difference vs the black fallback. - knip: drop stale npm-check-updates ignoreDependencies entry. Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa
This commit is contained in:
@@ -26,6 +26,14 @@ describe("rgbaStringToHex", () => {
|
||||
expect(rgbaStringToHex("#F1F5F9")).toBe("#f1f5f9");
|
||||
expect(rgbaStringToHex("#0F172A")).toBe("#0f172a");
|
||||
});
|
||||
|
||||
it("converts percentage-notation rgb via the @uiw fallback (integer parser misses it)", () => {
|
||||
expect(rgbaStringToHex("rgb(100%, 0%, 0%)")).toBe("#ff0000");
|
||||
});
|
||||
|
||||
it("returns black for formats neither parser nor @uiw understands", () => {
|
||||
expect(rgbaStringToHex("not-a-color")).toBe("#000000");
|
||||
});
|
||||
});
|
||||
|
||||
describe("isDarkColor", () => {
|
||||
|
||||
Reference in New Issue
Block a user