mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
[next] Cookie Support (#2339)
* feat: added cookie support to coral * feat: adapt client to use cookies * fix: safari input styles * fix: lint * fix: linting * fix: support clearing cookies properly, oauth * feat: support cookies for websocket upgrade requests * fix: lint * fix: tests
This commit is contained in:
@@ -5,7 +5,6 @@ import { CoralContext } from "coral-framework/lib/bootstrap";
|
||||
import { LOCAL_ID } from "coral-framework/lib/relay";
|
||||
import { createPromisifiedStorage } from "coral-framework/lib/storage";
|
||||
import {
|
||||
createAccessToken,
|
||||
createRelayEnvironment,
|
||||
replaceHistoryLocation,
|
||||
} from "coral-framework/testHelpers";
|
||||
@@ -57,13 +56,3 @@ it("set commentID from query", async () => {
|
||||
expect(source.get(LOCAL_ID)!.commentID).toBe(commentID);
|
||||
restoreHistoryLocation();
|
||||
});
|
||||
|
||||
it("set accessToken from localStorage", async () => {
|
||||
const context: Partial<CoralContext> = {
|
||||
localStorage: createPromisifiedStorage(),
|
||||
};
|
||||
const accessToken = createAccessToken();
|
||||
context.localStorage!.setItem("accessToken", accessToken);
|
||||
await initLocalState(environment, context as any);
|
||||
expect(source.get(LOCAL_ID)!.accessToken).toBe(accessToken);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user