Skip to content

Commit af46b4b

Browse files
committed
fix: fix
1 parent d7312e7 commit af46b4b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"build": "dumi build",
2626
"compile": "father build",
2727
"coverage": "npm test -- --coverage",
28-
"lint": "eslint src/ --ext .tsx,.ts & eslint tests/ --ext .js",
28+
"lint": "eslint src/ --ext .tsx,.ts & eslint tests/ --ext .tsx,.ts",
2929
"prepare": "husky install",
3030
"prepublishOnly": "npm run compile && np --yolo --no-publish",
3131
"start": "dumi dev",

tests/Portal.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,20 +192,20 @@ describe('Portal', () => {
192192

193193
it('should restore to original place in StrictMode', () => {
194194
const parentContainer = document.createElement('div');
195-
const domContainer = document.createElement('div');
196-
parentContainer.appendChild(domContainer);
195+
const curDomContainer = document.createElement('div');
196+
parentContainer.appendChild(curDomContainer);
197197
let mountCount = 0;
198198
let unmountCount = 0;
199199

200-
const Demo = () => {
200+
const Demo: React.FC = () => {
201201
useEffect(() => {
202202
mountCount += 1;
203203
return () => {
204204
unmountCount += 1;
205205
};
206206
}, []);
207207

208-
return <Portal getContainer={() => domContainer}>Contents</Portal>;
208+
return <Portal getContainer={() => curDomContainer}>Contents</Portal>;
209209
};
210210

211211
render(<Demo />, { wrapper: StrictMode });

tests/setStyle.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CSSProperties } from 'react';
1+
import type { CSSProperties } from 'react';
22
import setStyle from '../src/setStyle';
33

44
describe('setStyle', () => {

0 commit comments

Comments
 (0)