Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Oct 2, 2023
1 parent 0118266 commit dcd501f
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 7 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ module.exports = {
// These on-by-default rules aren't useful in test files.
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"jest/expect-expect": "off",
},
},
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@release-it/conventional-changelog": "^7.0.2",
"@testing-library/react": "^10.0.4",
"@types/eslint": "^8.44.3",
"@types/jest": "^29.5.5",
"@types/lodash.mapvalues": "^4.6.6",
"@types/node": "^20.5.9",
"@types/react-dom": "^18.2.7",
Expand Down
40 changes: 33 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/connect.test.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type * as jest from "jest";

import { render } from "@testing-library/react";
import React, { useEffect } from "react";
import { act } from "react-dom/test-utils";
Expand Down
1 change: 1 addition & 0 deletions src/connect.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type * as jest from "jest";
import type { MapDispatchToProps, MapStateToProps } from "react-redux";

import mapValues from "lodash.mapvalues";
Expand Down
2 changes: 2 additions & 0 deletions src/mockReactRedux.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type * as jest from "jest";

import { mockConnect } from "./connect.js";
import { GetSelector, createGetSelector } from "./selectors.js";
import { AnySelector, MockReactRedux } from "./types.js";
Expand Down
2 changes: 2 additions & 0 deletions src/selectors.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type * as jest from "jest";

import { AnySelector } from "./types.js";

export type GetSelector = <ReturnValue>(
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type * as jest from "jest";

/**
* Test APIs to modify the mocked react-redux hooks' behavior.
*/
Expand Down

0 comments on commit dcd501f

Please sign in to comment.