Skip to content

Commit

Permalink
fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
vzakharchenko committed Jul 7, 2021
1 parent 072f43b commit 552fd23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/session/storage/InMemoryDB.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'jest';
import {RequestObject, ResponseObject} from "../../index";
import {APIGateWayOptions} from "../../apigateway/ApiGateway";
import {initOptions} from "../../utils/DefaultPageHandlers";

import {InMemoryDB} from "./InMemoryDB";

const request: RequestObject = {
Expand Down Expand Up @@ -49,20 +50,20 @@ describe('InMemoryDB tests', () => {
});

test('test InMemoryDB', async () => {
const storage = new InMemoryDB();
const storage = new InMemoryDB();
storage.readStorage();
storage.updateStorage();
await storage.saveSession("1","1",1,"email",{});
await storage.saveSession("1", "1", 1, "email", {});
storage.updateStorage();
const session = await storage.getSessionIfExists("1");
expect(session).toEqual({
"email": "email",
"exp": 1,
"externalToken": {},
"keycloakSession": "1",
"session": "1"
email: "email",
exp: 1,
externalToken: {},
keycloakSession: "1",
session: "1",
});
await storage.updateSession("1","email",{});
await storage.updateSession("1", "email", {});
await storage.deleteSession("1");
});

Expand Down
1 change: 1 addition & 0 deletions src/session/storage/Strorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type StrorageDBType = {
}

export interface StrorageDB {

/**
* save access and refresh token and link them to sessionId
* @param sessionId a new sessionId
Expand Down

0 comments on commit 552fd23

Please sign in to comment.