Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Feb 22, 2024
1 parent 4b8907d commit e5ff6a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,18 @@ describe("ModalDesktopEditorOpenConfirmation", () => {
});

describe("StartMenuOptionDesktopEditorOpenSelection", () => {
it("StartMenuOptionDesktopEditorOpenSelection emthy array returns false", async () => {
const result = await StartMenuOptionDesktopEditorOpenSelection(
[],
false,
state,
jest.fn(),
"",
jest.fn()
);
expect(result).toBeFalsy();
});

it("sets modal confirmation open files if openWithoutConformationResult is false", async () => {
const select = ["file1.jpg", "file2.jpg"];
const collections = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ const MenuOptionDesktopEditorOpenSelection: React.FunctionComponent<IMenuOptionD
* Open editor with keys
*/
useHotKeys({ key: "e", ctrlKeyOrMetaKey: true }, () => {
console.log("hi");

StartMenuOptionDesktopEditorOpenSelection(
select,
isCollections,
Expand Down

0 comments on commit e5ff6a0

Please sign in to comment.