Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
angelo-v committed May 10, 2024
1 parent c058198 commit 5304ccf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions core/src/authentication/observeSession.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ describe("observe session", () => {
const subject = observeSession(session);

// and login occurs
// @ts-ignore allow to write session info
// @ts-expect-error allow to write session info
session["info"] = { isLoggedIn: true, sessionId: "test-session-id" };
// @ts-ignore allow to emit for testing
// @ts-expect-error allow to emit for testing
session.events.emit(EVENTS.LOGIN);

// the current session value is changed to logged in
Expand All @@ -54,9 +54,9 @@ describe("observe session", () => {
const subject = observeSession(session);

// and logout occurs
// @ts-ignore allow to write session info
// @ts-expect-error allow to write session info
session["info"] = { isLoggedIn: false, sessionId: "test-session-id" };
// @ts-ignore allow to emit for testing
// @ts-expect-error allow to emit for testing
session.events.emit(EVENTS.LOGOUT);

// the current session value is changed to logged in
Expand All @@ -77,9 +77,9 @@ describe("observe session", () => {
const subject = observeSession(session);

// and session restore occurs
// @ts-ignore allow to write session info
// @ts-expect-error allow to write session info
session["info"] = { isLoggedIn: true, sessionId: "test-session-id" };
// @ts-ignore allow to emit for testing
// @ts-expect-error allow to emit for testing
session.events.emit(EVENTS.SESSION_RESTORED);

// the current session value is changed to logged in
Expand Down
4 changes: 2 additions & 2 deletions core/src/authentication/observeSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function observeSession(session: Session): BehaviorSubject<SessionInfo> {
const logout = fromEvent(session.events, EVENTS.LOGOUT);
const sessionRestored = fromEvent(session.events, EVENTS.SESSION_RESTORED);
merge(login, logout, sessionRestored)
.pipe(map((it) => sessionInfoSubject.next(session.info)))
.pipe(map(() => sessionInfoSubject.next(session.info)))
.subscribe();
return sessionInfoSubject;
}
}

0 comments on commit 5304ccf

Please sign in to comment.