Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: 의존성 설치
run: pnpm install
- name: 테스트
run: pnpm vitest --coverage
run: pnpm run test --coverage
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오호 명령어를 패키지 스크립트로 하는게 확실히 더 관리하기 좋겠다

- name: 코드커버리지 업로드
uses: codecov/codecov-action@v5
with:
Expand Down
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global.d.ts 로 변경한 이유가 있을까?

File renamed without changes.
18 changes: 10 additions & 8 deletions .templates/component/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
environment: 'happy-dom',
passWithNoTests: true,
watch: false,
},
});
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup 파일 통일한거 너무 좋다

},
}),
);
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"type": "module",
"scripts": {
"build:storybook": "storybook build",
"dev:storybook": "storybook dev -p 6006"
"dev:storybook": "storybook dev -p 6006",
"test": "vitest"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
Expand All @@ -19,15 +20,15 @@
"@tsconfig/strictest": "^2.0.5",
"@types/node": "^22.8.1",
"@typescript-eslint/parser": "^8.19.0",
"@vitest/coverage-v8": "2.1.4",
"@vitest/coverage-v8": "catalog:",
"chromatic": "^11.19.0",
"eslint": "^9.17.0",
"knip": "catalog:",
"sanitize.css": "^13.0.0",
"storybook": "catalog:",
"tsup": "catalog:",
"typescript": "catalog:",
"vitest": "^2.1.8"
"vitest": "catalog:"
},
"packageManager": "pnpm@9.7.1"
}
File renamed without changes.
1 change: 0 additions & 1 deletion packages/Input/src/env.d.ts

This file was deleted.

21 changes: 10 additions & 11 deletions packages/Input/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
environment: 'happy-dom',
globals: true,
passWithNoTests: true,
setupFiles: './vitest.setup.ts',
watch: false,
css: true,
},
});
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
}),
);
File renamed without changes.
1 change: 0 additions & 1 deletion packages/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@types/react": "^18.3.12",
"@vitest/coverage-v8": "2.1.4",
"happy-dom": "catalog:",
"react": "^18.3.1",
"sanitize.css": "^13.0.0",
Expand Down
23 changes: 9 additions & 14 deletions packages/badge/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaultConfig로 중복 제거 나이스!!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 pr이랑 무관하게 생각이 든건데 프로젝트를 절대 경로로 관리해보는건 어떨까?


export default defineConfig({
test: {
coverage: {
include: ['./src/**/*.{ts,tsx}'],
exclude: ['./src/**/*.stories.tsx', './src/env.d.ts', './src/index.ts'],
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
css: true,
environment: 'happy-dom',
globals: true,
passWithNoTests: true,
setupFiles: './vitest.setup.ts',
watch: false,
},
});
}),
);
File renamed without changes.
1 change: 0 additions & 1 deletion packages/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@types/react": "^18.3.12",
"@vitest/coverage-v8": "2.1.4",
"happy-dom": "catalog:",
"react": "^18.3.1",
"sanitize.css": "^13.0.0",
Expand Down
23 changes: 9 additions & 14 deletions packages/card/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
coverage: {
include: ['./src/**/*.{ts,tsx}'],
exclude: ['./src/**/*.stories.tsx', './src/env.d.ts', './src/index.ts'],
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
css: true,
environment: 'happy-dom',
globals: true,
passWithNoTests: true,
setupFiles: './vitest.setup.ts',
watch: false,
},
});
}),
);
File renamed without changes.
1 change: 1 addition & 0 deletions packages/divider/src/Divider.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { Divider } from './Divider';

const meta = {
title: 'Divider',
component: Divider,
parameters: {
layout: 'centered',
Expand Down
21 changes: 10 additions & 11 deletions packages/divider/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
environment: 'happy-dom',
globals: true,
passWithNoTests: true,
setupFiles: './vitest.setup.ts',
watch: false,
css: true,
},
});
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
}),
);
File renamed without changes.
1 change: 1 addition & 0 deletions packages/radio-group/src/RadioGroup.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Radio } from './Radio';
import { RadioGroup } from './RadioGroup';

const meta = {
title: 'RadioGroup',
component: RadioGroup,
parameters: {
layout: 'centered',
Expand Down
20 changes: 10 additions & 10 deletions packages/radio-group/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
environment: 'happy-dom',
passWithNoTests: true,
watch: false,
setupFiles: ['./vitest.setup.ts'],
globals: true,
},
});
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
}),
);
File renamed without changes.
21 changes: 10 additions & 11 deletions packages/skeleton/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
environment: 'happy-dom',
globals: true,
passWithNoTests: true,
setupFiles: './vitest.setup.ts',
watch: false,
css: true,
},
});
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
}),
);
File renamed without changes.
21 changes: 10 additions & 11 deletions packages/switch/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
environment: 'happy-dom',
globals: true,
passWithNoTests: true,
setupFiles: './vitest.setup.ts',
watch: false,
css: true,
},
});
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
}),
);
File renamed without changes.
1 change: 1 addition & 0 deletions packages/tooltip/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module '*.module.css';
21 changes: 10 additions & 11 deletions packages/tooltip/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
environment: 'happy-dom',
globals: true,
passWithNoTests: true,
setupFiles: './vitest.setup.ts',
watch: false,
css: true,
},
});
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
}),
);
1 change: 1 addition & 0 deletions packages/typography/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module '*.module.css';
21 changes: 10 additions & 11 deletions packages/typography/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { defineConfig } from 'vitest/config';
import { defineProject, mergeConfig } from 'vitest/config';
import defaultConfig from '../../vitest.config';

export default defineConfig({
test: {
environment: 'happy-dom',
globals: true,
passWithNoTests: true,
setupFiles: './vitest.setup.ts',
watch: false,
css: true,
},
});
export default mergeConfig(
defaultConfig,
defineProject({
test: {
setupFiles: './vitest.setup.ts',
},
}),
);
27 changes: 12 additions & 15 deletions pnpm-lock.yaml

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

Loading