Skip to content

Commit

Permalink
Fix storage key in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
halilcengel committed Jul 2, 2024
1 parent 9a68014 commit 8f3895b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/test/context.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jest.mock("@nucleoidai/react-event", () => ({
}));

beforeEach(() => {
storage.set("ide", "selected", "context", {
storage.set("ide", "selected", "project", {
id: "21d2530b-4657-4ac0-b8cd-1a9f82786e32",
});
storage.set(
"ide",
"context",
"project",
"21d2530b-4657-4ac0-b8cd-1a9f82786e32",
Context.withBlank()
);
Expand Down
6 changes: 3 additions & 3 deletions src/utils/test/Path.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ test("returns false when the new path is not used", () => {
test("returns the selected project in storage", () => {
const projectId = "f1f04060-1ea4-46fc-bbf9-fb69c1faca8b";

storage.set("ide", "selected", "context", projectId);
storage.set("ide", "selected", "project", projectId);

expect(storage.set).toHaveBeenCalledWith(
"ide",
"selected",
"context",
"project",
projectId
);

Expand All @@ -80,7 +80,7 @@ test("returns the selected project in storage", () => {
});

test("returns null when the selected project is not found", () => {
storage.set("ide", "selected", "context", null);
storage.set("ide", "selected", "project", null);
const recentProject = Path.getRecentProject();
expect(recentProject).toEqual(null);
});
Expand Down

0 comments on commit 8f3895b

Please sign in to comment.