Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into feat/#9

테스트 통과를 위해 dev 브랜치 pull
  • Loading branch information
pp449 committed Apr 2, 2023
2 parents b258019 + 3c97939 commit b8cfc7f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
9 changes: 8 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ export default {
testEnvironment: 'jsdom',
testMatch: ['**/src/**/*.{spec,test}.{js,jsx,ts,tsx}'],
moduleNameMapper: {
'^@/(.*)': '<rootDir>/src/$1',
'^@type/(.*)$': '<rootDir>/src/@types/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@constants/(.*)$': '<rootDir>/src/constants/$1',
'^@styles/(.*)$': '<rootDir>/src/styles/$1',
'^@utils/(.*)$': '<rootDir>/src/utils/$1',
'^@hooks/(.*)$': '<rootDir>/src/hooks/$1',
'^@pages/(.*)$': '<rootDir>/src/pages/$1',
'^@assets/(.*)$': '<rootDir>/public/assets/$1',
},
};
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const App = () => {
<Route path="/" element={<Home />} />
<Route path="/announcement" element={<Announcement />} />
<Route path="/my" element={<My />} />
<Route path="major-decision" element={<MajorDecision />} />
<Route path="/major-decision" element={<MajorDecision />} />
</Routes>
);
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/Image/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from '@emotion/styled';
import { Size, SizeOption } from '@type/styles/size';
import { setSize } from '@utils/styles/size';
import React, { CSSProperties } from 'react';
import { Size, SizeOption } from 'src/@types/styles/size';
import { CSSProperties } from 'react';

type ImageSize = {
[key in SizeOption]: Size;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/styles/size.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Size } from 'src/@types/styles/size';
import { Size } from '@type/styles/size';

export function setSize(heigth: number): Size;
export function setSize(height: number, width?: number): Size;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.path.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@type/*": ["./src/@types/*"],
"@components/*": ["./src/components/*"],
"@constants/*": ["./src/constants/*"],
"@styles/*": ["./src/styles/*"],
Expand Down
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export default defineConfig({
plugins: [react(), tsconfigPaths()],
resolve: {
alias: [
{
find: '@type',
replacement: resolve(__dirname, './src/@types'),
},
{
find: '@components',
replacement: resolve(__dirname, './src/components'),
Expand Down

0 comments on commit b8cfc7f

Please sign in to comment.