Skip to content

Commit

Permalink
chore: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Jul 18, 2023
1 parent 05d69d7 commit b8acddc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"devDependencies": {
"@commitlint/cli": "^17",
"@commitlint/config-conventional": "^17",
"@testing-library/jest-dom": "^5",
"@testing-library/react": "^14",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
6 changes: 3 additions & 3 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { hello } from 'easy-antd-modal';
import { Modal } from 'easy-antd-modal';

test('hello', () => {
expect(hello()).toBe('world');
test('Modal', () => {
expect(Modal).toBeDefined();
});
1 change: 1 addition & 0 deletions tests/test-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom';
3 changes: 0 additions & 3 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { defineConfig } from 'vitest/config';
import { name } from './package.json';

export default defineConfig({
esbuild: {
jsxInject: "import React from 'react'",
},
test: {
setupFiles: './tests/test-setup.ts',
environment: 'jsdom',
Expand Down

0 comments on commit b8acddc

Please sign in to comment.