Skip to content

Commit 3e3a3d4

Browse files
authored
Merge pull request #13 from moser-jose/feat/move-setup-tests
Move setupTests.ts to src/__tests__ and update configuration
2 parents b44872d + 115aaf7 commit 3e3a3d4

File tree

5 files changed

+26
-1104
lines changed

5 files changed

+26
-1104
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default function Example() {
108108

109109
### `Icon` component props
110110

111-
- `name` (string): icon name (see the generated list in [icon-names.json](/src/icon-names.json)).
111+
- `name` (string): icon name (see the generated list in [icon-names.json](/icon-names.json)).
112112
- `type` (optional): icon variant; default: `"outline"`.
113113
- `size` (optional): size in px; default: `24`.
114114
- `color` (optional): color (stroke/fill) in HEX; default: `#1C274C`.
@@ -125,14 +125,16 @@ When importing individual components (e.g., `BoldHome`, `OutlineBell`), they acc
125125

126126
1. Add/update your `.svg` files in `src/icons/<variant>/<folder>/...`.
127127

128-
> Note: Before adding new SVGs, make sure to check whether the name already exists in the list provided in [icon-names.json](/src/icon-names.json). If the name already exists, you **must rename** the SVG before including it.
128+
> Note: Before adding new SVGs, make sure to check whether the name already exists in the list provided in [icon-names.json](/icon-names.json). If the name already exists, you **must rename** the SVG before including it.
129129
> You need to add the SVGs according to the variant, e.g., **bold**, **bold-duotone**, **outline**, **outline-duotone**, and **broken**.
130130
131-
2. Run the generation script:
131+
1. Run the generation script:
132132

133133
```bash
134134
npm run generate:icons
135135
# or
136+
yarn run generate:icons
137+
# or
136138
pnpm run generate:icons
137139
```
138140

@@ -141,7 +143,9 @@ pnpm run generate:icons
141143
```bash
142144
npm run test
143145
# or
144-
pnpm test
146+
yarn run test
147+
# or
148+
pnpm run test
145149

146150
npm run test:ci #coverage
147151
```

jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const config: Config = {
2424
transformIgnorePatterns: [
2525
'node_modules/(?!(react-native|@react-native|@testing-library/react-native)/)',
2626
],
27-
setupFilesAfterEnv: ['<rootDir>/test/setupTests.ts'],
27+
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setupTests.ts'],
2828
};
2929

3030
export default config;

0 commit comments

Comments
 (0)