Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
matej-marcisovsky committed Feb 5, 2024
1 parent c913372 commit 677dfcc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-rockets-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ima/core": patch
---

Fixed OC chaining and missing type for Response cookie options.
6 changes: 3 additions & 3 deletions packages/core/src/storage/__tests__/CookieStorageSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('ima.storage.CookieStorage', () => {
const setCookieStringWithDomain =
'cok3=hello3; Path=/; Domain=localhost:3001; Expires=Fri, 31 Dec 9999 23:59:59 GMT';
const setCookieStringWithComplex =
'cok3="hello3"; Domain=localhost:3001; Expires=Fri, 31 Dec 9999 23:59:59 GMT; HttpOnly; Secure; Partitioned; Path=/; SameSite=Lax';
'cok3="hello3"; Domain=localhost:3001; Expires=Fri, 31 Dec 9999 23:59:59 GMT; HttpOnly; Secure; Partitioned; Path=/; SameSite=lax';
const setCookieStringWithMaxAge =
'cok3="hello3"; Domain=localhost:3001; Expires=Fri, 31 Dec 9999 23:59:59 GMT; Max-Age=5; HttpOnly; Partitioned; Secure; Path=/';
const cookiesStringForCookieHeader = 'cok1=hello; cok2=hello2';
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('ima.storage.CookieStorage', () => {
(cookie['_storage'].get('cok1') as Cookie).options.expires
).not.toBeNull();
expect((cookie['_storage'].get('cok1') as Cookie).options.sameSite).toBe(
'Lax'
'lax'
);
expect((cookie['_storage'].get('cok2') as Cookie).options.path).toBe('/');
});
Expand Down Expand Up @@ -240,7 +240,7 @@ describe('ima.storage.CookieStorage', () => {
secure: true,
path: '/',
domain: 'localhost:3001',
sameSite: 'Lax',
sameSite: 'lax',
partitioned: true,
});
});
Expand Down

0 comments on commit 677dfcc

Please sign in to comment.