Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeeMorris committed Sep 15, 2023
1 parent aeaa586 commit bb17b50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
9 changes: 2 additions & 7 deletions lib/SelectionProvider/.specs/useObjectSelector.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import React from "react";
import {
describe,
expect,
it,
} from 'vitest';
import { renderHook, act } from "@testing-library/react-hooks";
import { describe, expect, it } from "vitest";
import { renderHook, act } from "@testing-library/react";
import { useObjectSelector } from "../useObjectSelector";
import { SelectionProvider } from "../";


describe("useObjectSelector", () => {
it("should select the given ids", () => {
const id = 1;
Expand Down
14 changes: 5 additions & 9 deletions lib/SelectionProvider/.specs/useShiftSelect.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import React from "react";
import {
describe,
expect,
it,
} from 'vitest';
import { renderHook, act } from "@testing-library/react-hooks";
import { describe, expect, it } from "vitest";
import { renderHook, act } from "@testing-library/react";
import { useShiftSelect } from "../useShiftSelect";
import { SelectionProvider } from "../";

describe('useShiftSelect', () => {
it("selects multiple when shift clicking", () => {
describe("useShiftSelect", () => {
it("selects multiple when shift clicking", () => {
let id = 1;
// eslint-disable-next-line react/prop-types
const wrapper = ({ children }: any) => (
Expand Down Expand Up @@ -79,4 +75,4 @@ describe('useShiftSelect', () => {

expect(result.current.selected).toEqual([1, id]);
});
})
});

0 comments on commit bb17b50

Please sign in to comment.