Skip to content

Commit

Permalink
test: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Aug 13, 2024
1 parent d751964 commit 2ad86d4
Show file tree
Hide file tree
Showing 6 changed files with 12,828 additions and 9,465 deletions.
4 changes: 2 additions & 2 deletions docs/examples/theme.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import '../../assets/index.less';
import React, { useState } from 'react';
import Footer from 'rc-footer';
import Footer, { type FooterProps } from 'rc-footer';

export default function App() {
const [theme, setTheme] = useState('light');
const [theme, setTheme] = useState<FooterProps['theme']>('light');
return (
<div>
<Footer
Expand Down
15 changes: 15 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { createConfig, type Config } from '@umijs/test';

const defaultConfig = createConfig({
target: 'browser',
});

const config: Config.InitialOptions = {
...defaultConfig,
setupFilesAfterEnv: [
...(defaultConfig.setupFilesAfterEnv || []),
'./tests/setupFilesAfterEnv.ts'
],
}

export default config;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@
"@testing-library/react": "^14.3.1",
"@types/classnames": "^2.3.1",
"@types/jest": "^29.5.12",
"@types/node": "^22.2.0",
"@types/react": "^17.0.80",
"@types/react-dom": "^16.9.24",
"@umijs/fabric": "^4.0.0",
"@umijs/test": "^4.3.12",
"dumi": "^2.4.7",
"eslint": "^7.32.0",
"eslint": "^8.57.0",
"father": "^4.5.0",
"gh-pages": "^3.2.3",
"husky": "^8.0.3",
Expand Down
Loading

0 comments on commit 2ad86d4

Please sign in to comment.