minor fixes, 1 test for session manager

This commit is contained in:
2026-07-30 18:00:01 +02:00
parent 5d197b4513
commit 3e6d607e18
2 changed files with 14 additions and 3 deletions
+11 -1
View File
@@ -1,5 +1,5 @@
import type { UserInfo } from "@core/session_manager";
import { createInitialSessionState, login } from "@core/session_manager";
import { createInitialSessionState, getCurrentSession, login } from "@core/session_manager";
import { createInitialShellState } from "@core/shell_state";
import { buildTestFS } from "@tests/helpers/filesystems_fixture";
import { depth7Tree } from "@tests/helpers/tree_fixture";
@@ -44,5 +44,15 @@ test("createInitialSessionState - successfully creates a new session state", ()
describe("login", () => {
test("it successfully starts a new session under the user test", () => {
const newState = login(state, "test", "321", passMap);
const pop = getCurrentSession(newState);
expect(pop.user).toEqual(testU);
});
test("", () => {
const newState = login(state, "test", "321", passMap);
const pop = getCurrentSession(newState);
expect(pop.user).toEqual(testU);
});
});