| import { faker } from '@faker-js/faker' | |||||
| interface FakeData { | |||||
| id: number; | |||||
| name: string; | |||||
| color: string; | |||||
| price: string; | |||||
| company: string; | |||||
| } | |||||
| module.exports = () => { | |||||
| const items:FakeData[] = []; | |||||
| for (let id = 1; id <= 500; id++) { | |||||
| items.push({ | |||||
| id: id, | |||||
| name: `${faker.commerce.productAdjective()} ${faker.commerce.productMaterial()} ${faker.commerce.product()}`, | |||||
| color: faker.commerce.color(), | |||||
| price: `$${faker.commerce.price()}`, | |||||
| company: faker.company.companyName(), | |||||
| }); | |||||
| } | |||||
| return { items }; | |||||
| }; |
| "version": "0.1.0", | "version": "0.1.0", | ||||
| "private": true, | "private": true, | ||||
| "dependencies": { | "dependencies": { | ||||
| "@faker-js/faker": "^7.6.0", | |||||
| "@testing-library/jest-dom": "^5.14.1", | "@testing-library/jest-dom": "^5.14.1", | ||||
| "@testing-library/react": "^13.0.0", | "@testing-library/react": "^13.0.0", | ||||
| "@testing-library/user-event": "^13.2.1", | "@testing-library/user-event": "^13.2.1", |
| minimatch "^3.1.2" | minimatch "^3.1.2" | ||||
| strip-json-comments "^3.1.1" | strip-json-comments "^3.1.1" | ||||
| "@faker-js/faker@^7.6.0": | |||||
| version "7.6.0" | |||||
| resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-7.6.0.tgz#9ea331766084288634a9247fcd8b84f16ff4ba07" | |||||
| integrity sha512-XK6BTq1NDMo9Xqw/YkYyGjSsg44fbNwYRx7QK2CuoQgyy+f1rrTDHoExVM5PsyXCtfl2vs2vVJ0MN0yN6LppRw== | |||||
| "@humanwhocodes/config-array@^0.11.6": | "@humanwhocodes/config-array@^0.11.6": | ||||
| version "0.11.7" | version "0.11.7" | ||||
| resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.7.tgz#38aec044c6c828f6ed51d5d7ae3d9b9faf6dbb0f" | resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.7.tgz#38aec044c6c828f6ed51d5d7ae3d9b9faf6dbb0f" |