@reallukemanning/folio 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/copy-components.js +31 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/core/copy-components.js.html +178 -0
- package/coverage/core/eslint.config.js.html +184 -0
- package/coverage/core/index.html +146 -0
- package/coverage/core/src/__tests__/benchmarks/ProjectCard.bench.tsx.html +364 -0
- package/coverage/core/src/__tests__/benchmarks/ProjectView.bench.tsx.html +484 -0
- package/coverage/core/src/__tests__/benchmarks/github.bench.ts.html +244 -0
- package/coverage/core/src/__tests__/benchmarks/index.html +191 -0
- package/coverage/core/src/__tests__/benchmarks/npm.bench.ts.html +271 -0
- package/coverage/core/src/__tests__/benchmarks/product-hunt.bench.ts.html +259 -0
- package/coverage/core/src/__tests__/benchmarks/utilities.bench.ts.html +478 -0
- package/coverage/core/src/components/FeaturedProject.test.tsx.html +697 -0
- package/coverage/core/src/components/FeaturedProject.tsx.html +163 -0
- package/coverage/core/src/components/ProjectCard/ProjectCard.test.tsx.html +928 -0
- package/coverage/core/src/components/ProjectCard/ProjectCard.tsx.html +379 -0
- package/coverage/core/src/components/ProjectCard/index.html +146 -0
- package/coverage/core/src/components/ProjectCard/index.ts.html +88 -0
- package/coverage/core/src/components/ProjectGrid/ProjectGrid.test.tsx.html +292 -0
- package/coverage/core/src/components/ProjectGrid/ProjectGrid.tsx.html +103 -0
- package/coverage/core/src/components/ProjectGrid/index.html +146 -0
- package/coverage/core/src/components/ProjectGrid/index.ts.html +88 -0
- package/coverage/core/src/components/ProjectList/ProjectList.test.tsx.html +292 -0
- package/coverage/core/src/components/ProjectList/ProjectList.tsx.html +103 -0
- package/coverage/core/src/components/ProjectList/index.html +146 -0
- package/coverage/core/src/components/ProjectList/index.ts.html +88 -0
- package/coverage/core/src/components/ProjectView/ProjectView.test.tsx.html +1108 -0
- package/coverage/core/src/components/ProjectView/ProjectView.tsx.html +589 -0
- package/coverage/core/src/components/ProjectView/index.html +146 -0
- package/coverage/core/src/components/ProjectView/index.ts.html +88 -0
- package/coverage/core/src/components/index.html +146 -0
- package/coverage/core/src/components/index.ts.html +97 -0
- package/coverage/core/src/index.html +116 -0
- package/coverage/core/src/index.ts.html +94 -0
- package/coverage/core/src/lib/__tests__/defineProjects.test.ts.html +421 -0
- package/coverage/core/src/lib/__tests__/filterByFeatured.test.ts.html +523 -0
- package/coverage/core/src/lib/__tests__/filterByStatus.test.ts.html +664 -0
- package/coverage/core/src/lib/__tests__/filterByType.test.ts.html +631 -0
- package/coverage/core/src/lib/__tests__/github.test.ts.html +1783 -0
- package/coverage/core/src/lib/__tests__/hybrid-config.test.ts.html +1345 -0
- package/coverage/core/src/lib/__tests__/index.html +311 -0
- package/coverage/core/src/lib/__tests__/normalise.test.ts.html +1585 -0
- package/coverage/core/src/lib/__tests__/npm-config.test.ts.html +385 -0
- package/coverage/core/src/lib/__tests__/npm.test.ts.html +1135 -0
- package/coverage/core/src/lib/__tests__/product-hunt-config.test.ts.html +397 -0
- package/coverage/core/src/lib/__tests__/product-hunt.test.ts.html +505 -0
- package/coverage/core/src/lib/__tests__/sortByDate.test.ts.html +751 -0
- package/coverage/core/src/lib/__tests__/sortByName.test.ts.html +832 -0
- package/coverage/core/src/lib/__tests__/sortByStars.test.ts.html +703 -0
- package/coverage/core/src/lib/defineProjects.ts.html +100 -0
- package/coverage/core/src/lib/filterByFeatured.ts.html +133 -0
- package/coverage/core/src/lib/filterByStatus.ts.html +145 -0
- package/coverage/core/src/lib/filterByType.ts.html +133 -0
- package/coverage/core/src/lib/github.ts.html +517 -0
- package/coverage/core/src/lib/index.html +281 -0
- package/coverage/core/src/lib/index.ts.html +130 -0
- package/coverage/core/src/lib/normalise.ts.html +868 -0
- package/coverage/core/src/lib/npm.ts.html +199 -0
- package/coverage/core/src/lib/product-hunt.ts.html +256 -0
- package/coverage/core/src/lib/sortByDate.ts.html +175 -0
- package/coverage/core/src/lib/sortByName.ts.html +172 -0
- package/coverage/core/src/lib/sortByStars.ts.html +172 -0
- package/coverage/core/src/types/index.html +116 -0
- package/coverage/core/src/types/index.ts.html +517 -0
- package/coverage/core/vitest.config.ts.html +178 -0
- package/coverage/coverage-final.json +53 -0
- package/coverage/coverage-summary.json +54 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +266 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/dist/cli-components/FeaturedProject/FeaturedProject.d.ts +6 -0
- package/dist/cli-components/FeaturedProject/FeaturedProject.d.ts.map +1 -0
- package/dist/cli-components/FeaturedProject/FeaturedProject.js +9 -0
- package/dist/cli-components/FeaturedProject/FeaturedProject.js.map +1 -0
- package/dist/cli-components/FeaturedProject/FeaturedProject.tsx +54 -0
- package/dist/cli-components/FeaturedProject/index.d.ts +3 -0
- package/dist/cli-components/FeaturedProject/index.d.ts.map +1 -0
- package/dist/cli-components/FeaturedProject/index.js +2 -0
- package/dist/cli-components/FeaturedProject/index.js.map +1 -0
- package/dist/cli-components/FeaturedProject/index.ts +2 -0
- package/dist/cli-components/ProjectCard/ProjectCard.d.ts +26 -0
- package/dist/cli-components/ProjectCard/ProjectCard.d.ts.map +1 -0
- package/dist/cli-components/ProjectCard/ProjectCard.js +33 -0
- package/dist/cli-components/ProjectCard/ProjectCard.js.map +1 -0
- package/dist/cli-components/ProjectCard/ProjectCard.tsx +90 -0
- package/dist/cli-components/ProjectCard/index.d.ts +3 -0
- package/dist/cli-components/ProjectCard/index.d.ts.map +1 -0
- package/dist/cli-components/ProjectCard/index.js +2 -0
- package/dist/cli-components/ProjectCard/index.js.map +1 -0
- package/dist/cli-components/ProjectCard/index.ts +2 -0
- package/dist/cli-components/ProjectGrid/ProjectGrid.d.ts +5 -0
- package/dist/cli-components/ProjectGrid/ProjectGrid.d.ts.map +1 -0
- package/dist/cli-components/ProjectGrid/ProjectGrid.js +8 -0
- package/dist/cli-components/ProjectGrid/ProjectGrid.js.map +1 -0
- package/dist/cli-components/ProjectGrid/ProjectGrid.tsx +6 -0
- package/dist/cli-components/ProjectGrid/index.d.ts +3 -0
- package/dist/cli-components/ProjectGrid/index.d.ts.map +1 -0
- package/dist/cli-components/ProjectGrid/index.js +2 -0
- package/dist/cli-components/ProjectGrid/index.js.map +1 -0
- package/dist/cli-components/ProjectGrid/index.ts +2 -0
- package/dist/cli-components/ProjectList/ProjectList.d.ts +5 -0
- package/dist/cli-components/ProjectList/ProjectList.d.ts.map +1 -0
- package/dist/cli-components/ProjectList/ProjectList.js +8 -0
- package/dist/cli-components/ProjectList/ProjectList.js.map +1 -0
- package/dist/cli-components/ProjectList/ProjectList.tsx +6 -0
- package/dist/cli-components/ProjectList/index.d.ts +3 -0
- package/dist/cli-components/ProjectList/index.d.ts.map +1 -0
- package/dist/cli-components/ProjectList/index.js +2 -0
- package/dist/cli-components/ProjectList/index.js.map +1 -0
- package/dist/cli-components/ProjectList/index.ts +2 -0
- package/dist/cli-components/ProjectView/ProjectView.d.ts +17 -0
- package/dist/cli-components/ProjectView/ProjectView.d.ts.map +1 -0
- package/dist/cli-components/ProjectView/ProjectView.js +39 -0
- package/dist/cli-components/ProjectView/ProjectView.js.map +1 -0
- package/dist/cli-components/ProjectView/ProjectView.tsx +117 -0
- package/dist/cli-components/ProjectView/index.d.ts +3 -0
- package/dist/cli-components/ProjectView/index.d.ts.map +1 -0
- package/dist/cli-components/ProjectView/index.js +2 -0
- package/dist/cli-components/ProjectView/index.js.map +1 -0
- package/dist/cli-components/ProjectView/index.ts +2 -0
- package/dist/cli-components/types.d.ts +52 -0
- package/dist/cli-components/types.d.ts.map +1 -0
- package/dist/cli-components/types.js +2 -0
- package/dist/cli-components/types.js.map +1 -0
- package/dist/cli-components/types.ts +58 -0
- package/dist/cli-types.d.ts +52 -0
- package/dist/cli-types.d.ts.map +1 -0
- package/dist/cli-types.js +2 -0
- package/dist/cli-types.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +21 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/add.d.ts +2 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +166 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +231 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/components/FeaturedProject.d.ts +7 -0
- package/dist/components/FeaturedProject.d.ts.map +1 -0
- package/dist/components/FeaturedProject.js +10 -0
- package/dist/components/FeaturedProject.js.map +1 -0
- package/dist/components/FeaturedProject.test.tsx +204 -0
- package/dist/components/FeaturedProject.tsx +26 -0
- package/dist/components/ProjectCard/ProjectCard.d.ts +26 -0
- package/dist/components/ProjectCard/ProjectCard.d.ts.map +1 -0
- package/dist/components/ProjectCard/ProjectCard.js +39 -0
- package/dist/components/ProjectCard/ProjectCard.js.map +1 -0
- package/dist/components/ProjectCard/ProjectCard.test.tsx +281 -0
- package/dist/components/ProjectCard/ProjectCard.tsx +98 -0
- package/dist/components/ProjectCard/index.d.ts +2 -0
- package/dist/components/ProjectCard/index.d.ts.map +1 -0
- package/dist/components/ProjectCard/index.js +2 -0
- package/dist/components/ProjectCard/index.js.map +1 -0
- package/dist/components/ProjectCard/index.ts +1 -0
- package/dist/components/ProjectGrid/ProjectGrid.d.ts +5 -0
- package/dist/components/ProjectGrid/ProjectGrid.d.ts.map +1 -0
- package/dist/components/ProjectGrid/ProjectGrid.js +8 -0
- package/dist/components/ProjectGrid/ProjectGrid.js.map +1 -0
- package/dist/components/ProjectGrid/ProjectGrid.test.tsx +69 -0
- package/dist/components/ProjectGrid/ProjectGrid.tsx +6 -0
- package/dist/components/ProjectGrid/index.d.ts +2 -0
- package/dist/components/ProjectGrid/index.d.ts.map +1 -0
- package/dist/components/ProjectGrid/index.js +2 -0
- package/dist/components/ProjectGrid/index.js.map +1 -0
- package/dist/components/ProjectGrid/index.ts +1 -0
- package/dist/components/ProjectList/ProjectList.d.ts +5 -0
- package/dist/components/ProjectList/ProjectList.d.ts.map +1 -0
- package/dist/components/ProjectList/ProjectList.js +8 -0
- package/dist/components/ProjectList/ProjectList.js.map +1 -0
- package/dist/components/ProjectList/ProjectList.test.tsx +69 -0
- package/dist/components/ProjectList/ProjectList.tsx +6 -0
- package/dist/components/ProjectList/index.d.ts +2 -0
- package/dist/components/ProjectList/index.d.ts.map +1 -0
- package/dist/components/ProjectList/index.js +2 -0
- package/dist/components/ProjectList/index.js.map +1 -0
- package/dist/components/ProjectList/index.ts +1 -0
- package/dist/components/ProjectView/ProjectView.d.ts +20 -0
- package/dist/components/ProjectView/ProjectView.d.ts.map +1 -0
- package/dist/components/ProjectView/ProjectView.js +64 -0
- package/dist/components/ProjectView/ProjectView.js.map +1 -0
- package/dist/components/ProjectView/ProjectView.test.tsx +341 -0
- package/dist/components/ProjectView/ProjectView.tsx +168 -0
- package/dist/components/ProjectView/index.d.ts +2 -0
- package/dist/components/ProjectView/index.d.ts.map +1 -0
- package/dist/components/ProjectView/index.js +2 -0
- package/dist/components/ProjectView/index.js.map +1 -0
- package/dist/components/ProjectView/index.ts +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.ts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/defineProjects.d.ts +3 -0
- package/dist/lib/defineProjects.d.ts.map +1 -0
- package/dist/lib/defineProjects.js +4 -0
- package/dist/lib/defineProjects.js.map +1 -0
- package/dist/lib/filterByFeatured.d.ts +3 -0
- package/dist/lib/filterByFeatured.d.ts.map +1 -0
- package/dist/lib/filterByFeatured.js +10 -0
- package/dist/lib/filterByFeatured.js.map +1 -0
- package/dist/lib/filterByStatus.d.ts +3 -0
- package/dist/lib/filterByStatus.d.ts.map +1 -0
- package/dist/lib/filterByStatus.js +13 -0
- package/dist/lib/filterByStatus.js.map +1 -0
- package/dist/lib/filterByType.d.ts +3 -0
- package/dist/lib/filterByType.d.ts.map +1 -0
- package/dist/lib/filterByType.js +10 -0
- package/dist/lib/filterByType.js.map +1 -0
- package/dist/lib/github.d.ts +24 -0
- package/dist/lib/github.d.ts.map +1 -0
- package/dist/lib/github.js +107 -0
- package/dist/lib/github.js.map +1 -0
- package/dist/lib/index.d.ts +16 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +12 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/normalise.d.ts +4 -0
- package/dist/lib/normalise.d.ts.map +1 -0
- package/dist/lib/normalise.js +221 -0
- package/dist/lib/normalise.js.map +1 -0
- package/dist/lib/npm.d.ts +7 -0
- package/dist/lib/npm.d.ts.map +1 -0
- package/dist/lib/npm.js +28 -0
- package/dist/lib/npm.js.map +1 -0
- package/dist/lib/product-hunt.d.ts +12 -0
- package/dist/lib/product-hunt.d.ts.map +1 -0
- package/dist/lib/product-hunt.js +40 -0
- package/dist/lib/product-hunt.js.map +1 -0
- package/dist/lib/sortByDate.d.ts +4 -0
- package/dist/lib/sortByDate.d.ts.map +1 -0
- package/dist/lib/sortByDate.js +21 -0
- package/dist/lib/sortByDate.js.map +1 -0
- package/dist/lib/sortByName.d.ts +4 -0
- package/dist/lib/sortByName.d.ts.map +1 -0
- package/dist/lib/sortByName.js +21 -0
- package/dist/lib/sortByName.js.map +1 -0
- package/dist/lib/sortByStars.d.ts +4 -0
- package/dist/lib/sortByStars.d.ts.map +1 -0
- package/dist/lib/sortByStars.js +21 -0
- package/dist/lib/sortByStars.js.map +1 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +2 -0
- package/dist/test-setup.js.map +1 -0
- package/dist/types/index.d.ts +121 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/eslint.config.js +33 -0
- package/package.json +47 -0
- package/playwright-report/index.html +85 -0
- package/src/__tests__/benchmarks/ProjectCard.bench.tsx +93 -0
- package/src/__tests__/benchmarks/ProjectView.bench.tsx +133 -0
- package/src/__tests__/benchmarks/github.bench.ts +53 -0
- package/src/__tests__/benchmarks/npm.bench.ts +62 -0
- package/src/__tests__/benchmarks/product-hunt.bench.ts +58 -0
- package/src/__tests__/benchmarks/utilities.bench.ts +131 -0
- package/src/cli-components/FeaturedProject/FeaturedProject.tsx +54 -0
- package/src/cli-components/FeaturedProject/index.ts +2 -0
- package/src/cli-components/ProjectCard/ProjectCard.tsx +90 -0
- package/src/cli-components/ProjectCard/index.ts +2 -0
- package/src/cli-components/ProjectGrid/ProjectGrid.tsx +6 -0
- package/src/cli-components/ProjectGrid/index.ts +2 -0
- package/src/cli-components/ProjectList/ProjectList.tsx +6 -0
- package/src/cli-components/ProjectList/index.ts +2 -0
- package/src/cli-components/ProjectView/ProjectView.tsx +117 -0
- package/src/cli-components/ProjectView/index.ts +2 -0
- package/src/cli-components/types.ts +58 -0
- package/src/cli-types.ts +58 -0
- package/src/cli.ts +26 -0
- package/src/commands/add.ts +191 -0
- package/src/commands/init.ts +260 -0
- package/src/components/FeaturedProject.test.tsx +204 -0
- package/src/components/FeaturedProject.tsx +26 -0
- package/src/components/ProjectCard/ProjectCard.test.tsx +281 -0
- package/src/components/ProjectCard/ProjectCard.tsx +98 -0
- package/src/components/ProjectCard/index.ts +1 -0
- package/src/components/ProjectGrid/ProjectGrid.test.tsx +69 -0
- package/src/components/ProjectGrid/ProjectGrid.tsx +6 -0
- package/src/components/ProjectGrid/index.ts +1 -0
- package/src/components/ProjectList/ProjectList.test.tsx +69 -0
- package/src/components/ProjectList/ProjectList.tsx +6 -0
- package/src/components/ProjectList/index.ts +1 -0
- package/src/components/ProjectView/ProjectView.test.tsx +341 -0
- package/src/components/ProjectView/ProjectView.tsx +168 -0
- package/src/components/ProjectView/index.ts +1 -0
- package/src/components/index.ts +4 -0
- package/src/index.ts +3 -0
- package/src/lib/__tests__/defineProjects.test.ts +112 -0
- package/src/lib/__tests__/filterByFeatured.test.ts +146 -0
- package/src/lib/__tests__/filterByStatus.test.ts +193 -0
- package/src/lib/__tests__/filterByType.test.ts +182 -0
- package/src/lib/__tests__/github.test.ts +566 -0
- package/src/lib/__tests__/hybrid-config.test.ts +420 -0
- package/src/lib/__tests__/normalise.test.ts +500 -0
- package/src/lib/__tests__/npm-config.test.ts +100 -0
- package/src/lib/__tests__/npm.test.ts +350 -0
- package/src/lib/__tests__/product-hunt-config.test.ts +104 -0
- package/src/lib/__tests__/product-hunt.test.ts +140 -0
- package/src/lib/__tests__/sortByDate.test.ts +222 -0
- package/src/lib/__tests__/sortByName.test.ts +249 -0
- package/src/lib/__tests__/sortByStars.test.ts +206 -0
- package/src/lib/defineProjects.ts +5 -0
- package/src/lib/filterByFeatured.ts +16 -0
- package/src/lib/filterByStatus.ts +20 -0
- package/src/lib/filterByType.ts +16 -0
- package/src/lib/github.ts +144 -0
- package/src/lib/index.ts +15 -0
- package/src/lib/normalise.ts +261 -0
- package/src/lib/npm.ts +38 -0
- package/src/lib/product-hunt.ts +57 -0
- package/src/lib/sortByDate.ts +30 -0
- package/src/lib/sortByName.ts +29 -0
- package/src/lib/sortByStars.ts +29 -0
- package/src/test-setup.ts +1 -0
- package/src/types/index.ts +144 -0
- package/test-results/.last-run.json +62 -0
- package/tsconfig.json +29 -0
- package/vitest.config.ts +31 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { describe, it, expect, afterEach } from 'vitest'
|
|
2
|
+
import { render, screen, cleanup } from '@testing-library/react'
|
|
3
|
+
import { ProjectCard } from './ProjectCard'
|
|
4
|
+
import type { FolioProject } from '../../types'
|
|
5
|
+
|
|
6
|
+
afterEach(() => {
|
|
7
|
+
cleanup()
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const createProject = (overrides: Partial<FolioProject> = {}): FolioProject => ({
|
|
11
|
+
id: 'test-project',
|
|
12
|
+
type: 'github',
|
|
13
|
+
status: 'active',
|
|
14
|
+
featured: false,
|
|
15
|
+
name: 'Test Project',
|
|
16
|
+
tagline: 'A test project',
|
|
17
|
+
description: 'This is a test project description',
|
|
18
|
+
background: null,
|
|
19
|
+
why: null,
|
|
20
|
+
image: null,
|
|
21
|
+
struggles: [],
|
|
22
|
+
timeline: [],
|
|
23
|
+
posts: [],
|
|
24
|
+
stack: ['React', 'TypeScript'],
|
|
25
|
+
links: {
|
|
26
|
+
github: 'https://github.com/test/project',
|
|
27
|
+
live: 'https://test-project.com',
|
|
28
|
+
},
|
|
29
|
+
stats: {
|
|
30
|
+
stars: 100,
|
|
31
|
+
forks: 20,
|
|
32
|
+
},
|
|
33
|
+
language: 'TypeScript',
|
|
34
|
+
languageColor: '#3178c6',
|
|
35
|
+
createdAt: '2024-01-01',
|
|
36
|
+
updatedAt: '2024-06-01',
|
|
37
|
+
...overrides,
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
describe('ProjectCard', () => {
|
|
41
|
+
it('renders with valid project displaying name, description, and stats', () => {
|
|
42
|
+
const project = createProject()
|
|
43
|
+
|
|
44
|
+
const { container } = render(
|
|
45
|
+
<ProjectCard>
|
|
46
|
+
<ProjectCard.Header project={project} />
|
|
47
|
+
<ProjectCard.Description project={project} />
|
|
48
|
+
<ProjectCard.Tags project={project} />
|
|
49
|
+
<ProjectCard.Stats project={project} />
|
|
50
|
+
<ProjectCard.Status project={project} />
|
|
51
|
+
<ProjectCard.Links project={project} />
|
|
52
|
+
</ProjectCard>
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
expect(screen.getByRole('heading', { level: 3 })).toHaveTextContent('Test Project')
|
|
56
|
+
expect(container.querySelector('[data-folio-card-description]')).toHaveTextContent('This is a test project description')
|
|
57
|
+
expect(screen.getByText('100 stars')).toBeInTheDocument()
|
|
58
|
+
expect(screen.getByText('20 forks')).toBeInTheDocument()
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
it('displays GitHub-specific stats', () => {
|
|
62
|
+
const project = createProject({
|
|
63
|
+
type: 'github',
|
|
64
|
+
stats: { stars: 500, forks: 50 },
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const { container } = render(<ProjectCard.Stats project={project} />)
|
|
68
|
+
|
|
69
|
+
expect(screen.getByText('500 stars')).toBeInTheDocument()
|
|
70
|
+
expect(screen.getByText('50 forks')).toBeInTheDocument()
|
|
71
|
+
expect(container.querySelector('[data-folio-stat="downloads"]')).not.toBeInTheDocument()
|
|
72
|
+
expect(container.querySelector('[data-folio-stat="upvotes"]')).not.toBeInTheDocument()
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it('displays npm-specific stats', () => {
|
|
76
|
+
const project = createProject({
|
|
77
|
+
type: 'npm',
|
|
78
|
+
stats: { downloads: '10000', version: '2.0.0' },
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
const { container } = render(<ProjectCard.Stats project={project} />)
|
|
82
|
+
|
|
83
|
+
expect(screen.getByText('10000 downloads')).toBeInTheDocument()
|
|
84
|
+
expect(screen.getByText('2.0.0')).toBeInTheDocument()
|
|
85
|
+
expect(container.querySelector('[data-folio-stat="stars"]')).not.toBeInTheDocument()
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
it('displays product-hunt-specific stats', () => {
|
|
89
|
+
const project = createProject({
|
|
90
|
+
type: 'product-hunt',
|
|
91
|
+
stats: { upvotes: 250, comments: 30 },
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
const { container } = render(<ProjectCard.Stats project={project} />)
|
|
95
|
+
|
|
96
|
+
expect(screen.getByText('250 upvotes')).toBeInTheDocument()
|
|
97
|
+
expect(screen.getByText('30 comments')).toBeInTheDocument()
|
|
98
|
+
expect(container.querySelector('[data-folio-stat="stars"]')).not.toBeInTheDocument()
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
it('renders nothing when Description has no description', () => {
|
|
102
|
+
const project = createProject({ description: '' })
|
|
103
|
+
|
|
104
|
+
const { container } = render(<ProjectCard.Description project={project} />)
|
|
105
|
+
|
|
106
|
+
expect(container.querySelector('[data-folio-card-description]')).not.toBeInTheDocument()
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
it('renders nothing when Tags has empty stack', () => {
|
|
110
|
+
const project = createProject({ stack: [] })
|
|
111
|
+
|
|
112
|
+
const { container } = render(<ProjectCard.Tags project={project} />)
|
|
113
|
+
|
|
114
|
+
expect(container.querySelector('[data-folio-card-tags]')).not.toBeInTheDocument()
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
it('renders nothing when Stats has no stats', () => {
|
|
118
|
+
const project = createProject({ stats: null })
|
|
119
|
+
|
|
120
|
+
const { container } = render(<ProjectCard.Stats project={project} />)
|
|
121
|
+
|
|
122
|
+
expect(container.querySelector('[data-folio-card-stats]')).not.toBeInTheDocument()
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
it('renders nothing when Links has no links', () => {
|
|
126
|
+
const project = createProject({ links: {} })
|
|
127
|
+
|
|
128
|
+
const { container } = render(<ProjectCard.Links project={project} />)
|
|
129
|
+
|
|
130
|
+
expect(container.querySelector('[data-folio-card-links]')).not.toBeInTheDocument()
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
describe('ProjectCard data attributes', () => {
|
|
135
|
+
it('has correct data-folio-card attribute on root', () => {
|
|
136
|
+
const { container } = render(
|
|
137
|
+
<ProjectCard>
|
|
138
|
+
<span>Content</span>
|
|
139
|
+
</ProjectCard>
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
expect(container.querySelector('[data-folio-card]')).toBeInTheDocument()
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
it('has correct data-folio-card-header attribute', () => {
|
|
146
|
+
const project = createProject()
|
|
147
|
+
|
|
148
|
+
const { container } = render(<ProjectCard.Header project={project} />)
|
|
149
|
+
|
|
150
|
+
expect(container.querySelector('[data-folio-card-header]')).toBeInTheDocument()
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
it('has correct data-folio-type attributes', () => {
|
|
154
|
+
const project = createProject({ type: 'github' })
|
|
155
|
+
|
|
156
|
+
const { container } = render(<ProjectCard.Header project={project} />)
|
|
157
|
+
|
|
158
|
+
const typeEl = container.querySelector('[data-folio-type]')
|
|
159
|
+
expect(typeEl).toBeInTheDocument()
|
|
160
|
+
expect(typeEl).toHaveAttribute('data-folio-type-value', 'github')
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
it('has correct data-folio-card-description attribute', () => {
|
|
164
|
+
const project = createProject()
|
|
165
|
+
|
|
166
|
+
const { container } = render(<ProjectCard.Description project={project} />)
|
|
167
|
+
|
|
168
|
+
expect(container.querySelector('[data-folio-card-description]')).toBeInTheDocument()
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
it('has correct data-folio-card-tags attribute', () => {
|
|
172
|
+
const project = createProject()
|
|
173
|
+
|
|
174
|
+
const { container } = render(<ProjectCard.Tags project={project} />)
|
|
175
|
+
|
|
176
|
+
expect(container.querySelector('[data-folio-card-tags]')).toBeInTheDocument()
|
|
177
|
+
expect(container.querySelectorAll('[data-folio-tag]')).toHaveLength(2)
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
it('has correct data-folio-card-stats attribute', () => {
|
|
181
|
+
const project = createProject()
|
|
182
|
+
|
|
183
|
+
const { container } = render(<ProjectCard.Stats project={project} />)
|
|
184
|
+
|
|
185
|
+
expect(container.querySelector('[data-folio-card-stats]')).toBeInTheDocument()
|
|
186
|
+
})
|
|
187
|
+
|
|
188
|
+
it('has correct data-folio-status attributes', () => {
|
|
189
|
+
const project = createProject({ status: 'active' })
|
|
190
|
+
|
|
191
|
+
const { container } = render(<ProjectCard.Status project={project} />)
|
|
192
|
+
|
|
193
|
+
const statusEl = container.querySelector('[data-folio-status]')
|
|
194
|
+
expect(statusEl).toBeInTheDocument()
|
|
195
|
+
expect(statusEl).toHaveAttribute('data-folio-status-value', 'active')
|
|
196
|
+
})
|
|
197
|
+
|
|
198
|
+
it('has correct data-folio-card-links attribute', () => {
|
|
199
|
+
const project = createProject()
|
|
200
|
+
|
|
201
|
+
const { container } = render(<ProjectCard.Links project={project} />)
|
|
202
|
+
|
|
203
|
+
expect(container.querySelector('[data-folio-card-links]')).toBeInTheDocument()
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
it('has correct data-folio-link attributes', () => {
|
|
207
|
+
const project = createProject()
|
|
208
|
+
|
|
209
|
+
const { container } = render(<ProjectCard.Links project={project} />)
|
|
210
|
+
|
|
211
|
+
const githubLink = container.querySelector('[data-folio-link-type="github"]')
|
|
212
|
+
expect(githubLink).toBeInTheDocument()
|
|
213
|
+
expect(githubLink).toHaveAttribute('data-folio-link')
|
|
214
|
+
expect(githubLink).toHaveAttribute('href', 'https://github.com/test/project')
|
|
215
|
+
|
|
216
|
+
const liveLink = container.querySelector('[data-folio-link-type="live"]')
|
|
217
|
+
expect(liveLink).toBeInTheDocument()
|
|
218
|
+
expect(liveLink).toHaveAttribute('data-folio-link')
|
|
219
|
+
expect(liveLink).toHaveAttribute('href', 'https://test-project.com')
|
|
220
|
+
})
|
|
221
|
+
|
|
222
|
+
it('displays npm link with correct attributes', () => {
|
|
223
|
+
const project = createProject({
|
|
224
|
+
links: { npm: 'https://npmjs.com/package/test' }
|
|
225
|
+
})
|
|
226
|
+
|
|
227
|
+
const { container } = render(<ProjectCard.Links project={project} />)
|
|
228
|
+
|
|
229
|
+
const npmLink = container.querySelector('[data-folio-link-type="npm"]')
|
|
230
|
+
expect(npmLink).toBeInTheDocument()
|
|
231
|
+
expect(npmLink).toHaveAttribute('href', 'https://npmjs.com/package/test')
|
|
232
|
+
})
|
|
233
|
+
|
|
234
|
+
it('displays product-hunt link with correct attributes', () => {
|
|
235
|
+
const project = createProject({
|
|
236
|
+
links: { productHunt: 'https://producthunt.com/posts/test' }
|
|
237
|
+
})
|
|
238
|
+
|
|
239
|
+
const { container } = render(<ProjectCard.Links project={project} />)
|
|
240
|
+
|
|
241
|
+
const phLink = container.querySelector('[data-folio-link-type="product-hunt"]')
|
|
242
|
+
expect(phLink).toBeInTheDocument()
|
|
243
|
+
expect(phLink).toHaveAttribute('href', 'https://producthunt.com/posts/test')
|
|
244
|
+
})
|
|
245
|
+
})
|
|
246
|
+
|
|
247
|
+
describe('ProjectCard status values', () => {
|
|
248
|
+
const statuses: Array<'active' | 'shipped' | 'in-progress' | 'coming-soon' | 'archived' | 'for-sale'> = [
|
|
249
|
+
'active', 'shipped', 'in-progress', 'coming-soon', 'archived', 'for-sale'
|
|
250
|
+
]
|
|
251
|
+
|
|
252
|
+
for (const status of statuses) {
|
|
253
|
+
it(`displays ${status} status correctly`, () => {
|
|
254
|
+
const project = createProject({ status })
|
|
255
|
+
|
|
256
|
+
const { container } = render(<ProjectCard.Status project={project} />)
|
|
257
|
+
|
|
258
|
+
const statusEl = container.querySelector('[data-folio-status]')
|
|
259
|
+
expect(statusEl).toHaveAttribute('data-folio-status-value', status)
|
|
260
|
+
expect(statusEl).toHaveTextContent(status)
|
|
261
|
+
})
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
describe('ProjectCard type values', () => {
|
|
266
|
+
const types: Array<'github' | 'npm' | 'product-hunt' | 'manual' | 'hybrid'> = [
|
|
267
|
+
'github', 'npm', 'product-hunt', 'manual', 'hybrid'
|
|
268
|
+
]
|
|
269
|
+
|
|
270
|
+
for (const type of types) {
|
|
271
|
+
it(`displays ${type} type correctly`, () => {
|
|
272
|
+
const project = createProject({ type })
|
|
273
|
+
|
|
274
|
+
const { container } = render(<ProjectCard.Header project={project} />)
|
|
275
|
+
|
|
276
|
+
const typeEl = container.querySelector('[data-folio-type]')
|
|
277
|
+
expect(typeEl).toHaveAttribute('data-folio-type-value', type)
|
|
278
|
+
expect(typeEl).toHaveTextContent(type)
|
|
279
|
+
})
|
|
280
|
+
}
|
|
281
|
+
})
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { FolioProject } from '../../types'
|
|
2
|
+
|
|
3
|
+
function ProjectCard({ children }: { children: React.ReactNode }) {
|
|
4
|
+
return <div data-folio-card>{children}</div>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
ProjectCard.Header = function ProjectCardHeader({ project }: { project: FolioProject }) {
|
|
8
|
+
return (
|
|
9
|
+
<div data-folio-card-header>
|
|
10
|
+
<h3>{project.name}</h3>
|
|
11
|
+
<div data-folio-type data-folio-type-value={project.type}>
|
|
12
|
+
{project.type}
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
ProjectCard.Description = function ProjectCardDescription({ project }: { project: FolioProject }) {
|
|
19
|
+
if (!project.description) return null
|
|
20
|
+
return <div data-folio-card-description>{project.description}</div>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ProjectCard.Tags = function ProjectCardTags({ project }: { project: FolioProject }) {
|
|
24
|
+
if (!project.stack || project.stack.length === 0) return null
|
|
25
|
+
return (
|
|
26
|
+
<div data-folio-card-tags>
|
|
27
|
+
{project.stack.map((tag) => (
|
|
28
|
+
<span key={tag} data-folio-tag>
|
|
29
|
+
{tag}
|
|
30
|
+
</span>
|
|
31
|
+
))}
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ProjectCard.Stats = function ProjectCardStats({ project }: { project: FolioProject }) {
|
|
37
|
+
if (
|
|
38
|
+
!project.stats ||
|
|
39
|
+
(!project.stats.stars &&
|
|
40
|
+
!project.stats.forks &&
|
|
41
|
+
!project.stats.downloads &&
|
|
42
|
+
!project.stats.version &&
|
|
43
|
+
!project.stats.upvotes &&
|
|
44
|
+
!project.stats.comments)
|
|
45
|
+
) {
|
|
46
|
+
return null
|
|
47
|
+
}
|
|
48
|
+
return (
|
|
49
|
+
<div data-folio-card-stats>
|
|
50
|
+
{project.stats.stars && <span data-folio-stat="stars">{project.stats.stars} stars</span>}
|
|
51
|
+
{project.stats.forks && <span data-folio-stat="forks">{project.stats.forks} forks</span>}
|
|
52
|
+
{project.stats.downloads && (
|
|
53
|
+
<span data-folio-stat="downloads">{project.stats.downloads} downloads</span>
|
|
54
|
+
)}
|
|
55
|
+
{project.stats.version && <span data-folio-stat="version">{project.stats.version}</span>}
|
|
56
|
+
{project.stats.upvotes && <span data-folio-stat="upvotes">{project.stats.upvotes} upvotes</span>}
|
|
57
|
+
{project.stats.comments && <span data-folio-stat="comments">{project.stats.comments} comments</span>}
|
|
58
|
+
</div>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
ProjectCard.Status = function ProjectCardStatus({ project }: { project: FolioProject }) {
|
|
63
|
+
return (
|
|
64
|
+
<div data-folio-status data-folio-status-value={project.status}>
|
|
65
|
+
{project.status}
|
|
66
|
+
</div>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
ProjectCard.Links = function ProjectCardLinks({ project }: { project: FolioProject }) {
|
|
71
|
+
if (!project.links.github && !project.links.live && !project.links.npm && !project.links.productHunt) return null
|
|
72
|
+
return (
|
|
73
|
+
<div data-folio-card-links>
|
|
74
|
+
{project.links.github && (
|
|
75
|
+
<a href={project.links.github} data-folio-link data-folio-link-type="github">
|
|
76
|
+
GitHub
|
|
77
|
+
</a>
|
|
78
|
+
)}
|
|
79
|
+
{project.links.live && (
|
|
80
|
+
<a href={project.links.live} data-folio-link data-folio-link-type="live">
|
|
81
|
+
Live
|
|
82
|
+
</a>
|
|
83
|
+
)}
|
|
84
|
+
{project.links.npm && (
|
|
85
|
+
<a href={project.links.npm} data-folio-link data-folio-link-type="npm">
|
|
86
|
+
npm
|
|
87
|
+
</a>
|
|
88
|
+
)}
|
|
89
|
+
{project.links.productHunt && (
|
|
90
|
+
<a href={project.links.productHunt} data-folio-link data-folio-link-type="product-hunt">
|
|
91
|
+
Product Hunt
|
|
92
|
+
</a>
|
|
93
|
+
)}
|
|
94
|
+
</div>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { ProjectCard }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProjectCard } from './ProjectCard'
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { describe, it, expect, afterEach } from 'vitest'
|
|
2
|
+
import { render, screen, cleanup } from '@testing-library/react'
|
|
3
|
+
import { ProjectGrid } from './ProjectGrid'
|
|
4
|
+
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
cleanup()
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
describe('ProjectGrid', () => {
|
|
10
|
+
it('wraps children with grid data attribute', () => {
|
|
11
|
+
const { container } = render(
|
|
12
|
+
<ProjectGrid>
|
|
13
|
+
<span>Project 1</span>
|
|
14
|
+
<span>Project 2</span>
|
|
15
|
+
</ProjectGrid>
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
const grid = container.querySelector('[data-folio-grid]')
|
|
19
|
+
expect(grid).toBeInTheDocument()
|
|
20
|
+
expect(screen.getByText('Project 1')).toBeInTheDocument()
|
|
21
|
+
expect(screen.getByText('Project 2')).toBeInTheDocument()
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it('renders nothing without children', () => {
|
|
25
|
+
const { container } = render(<ProjectGrid>{undefined}</ProjectGrid>)
|
|
26
|
+
|
|
27
|
+
expect(container.querySelector('[data-folio-grid]')).not.toBeInTheDocument()
|
|
28
|
+
expect(container.firstChild).toBeNull()
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('renders nothing with null children', () => {
|
|
32
|
+
const { container } = render(<ProjectGrid children={null} />)
|
|
33
|
+
|
|
34
|
+
expect(container.querySelector('[data-folio-grid]')).not.toBeInTheDocument()
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it('renders nothing with empty string children', () => {
|
|
38
|
+
const { container } = render(<ProjectGrid>{''}</ProjectGrid>)
|
|
39
|
+
|
|
40
|
+
expect(container.querySelector('[data-folio-grid]')).not.toBeInTheDocument()
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
describe('ProjectGrid data attributes', () => {
|
|
45
|
+
it('has correct data-folio-grid attribute on root', () => {
|
|
46
|
+
const { container } = render(
|
|
47
|
+
<ProjectGrid>
|
|
48
|
+
<span>Content</span>
|
|
49
|
+
</ProjectGrid>
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
expect(container.querySelector('[data-folio-grid]')).toBeInTheDocument()
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
describe('ProjectGrid composition', () => {
|
|
57
|
+
it('composes correctly with ProjectCard children', () => {
|
|
58
|
+
const { container } = render(
|
|
59
|
+
<ProjectGrid>
|
|
60
|
+
<div data-folio-card>Card 1</div>
|
|
61
|
+
<div data-folio-card>Card 2</div>
|
|
62
|
+
</ProjectGrid>
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
const grid = container.querySelector('[data-folio-grid]')
|
|
66
|
+
expect(grid).toBeInTheDocument()
|
|
67
|
+
expect(container.querySelectorAll('[data-folio-card]')).toHaveLength(2)
|
|
68
|
+
})
|
|
69
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProjectGrid } from './ProjectGrid'
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { describe, it, expect, afterEach } from 'vitest'
|
|
2
|
+
import { render, screen, cleanup } from '@testing-library/react'
|
|
3
|
+
import { ProjectList } from './ProjectList'
|
|
4
|
+
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
cleanup()
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
describe('ProjectList', () => {
|
|
10
|
+
it('wraps children with list data attribute', () => {
|
|
11
|
+
const { container } = render(
|
|
12
|
+
<ProjectList>
|
|
13
|
+
<span>Project 1</span>
|
|
14
|
+
<span>Project 2</span>
|
|
15
|
+
</ProjectList>
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
const list = container.querySelector('[data-folio-list]')
|
|
19
|
+
expect(list).toBeInTheDocument()
|
|
20
|
+
expect(screen.getByText('Project 1')).toBeInTheDocument()
|
|
21
|
+
expect(screen.getByText('Project 2')).toBeInTheDocument()
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it('renders nothing without children', () => {
|
|
25
|
+
const { container } = render(<ProjectList>{undefined}</ProjectList>)
|
|
26
|
+
|
|
27
|
+
expect(container.querySelector('[data-folio-list]')).not.toBeInTheDocument()
|
|
28
|
+
expect(container.firstChild).toBeNull()
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('renders nothing with null children', () => {
|
|
32
|
+
const { container } = render(<ProjectList children={null} />)
|
|
33
|
+
|
|
34
|
+
expect(container.querySelector('[data-folio-list]')).not.toBeInTheDocument()
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it('renders nothing with empty string children', () => {
|
|
38
|
+
const { container } = render(<ProjectList>{''}</ProjectList>)
|
|
39
|
+
|
|
40
|
+
expect(container.querySelector('[data-folio-list]')).not.toBeInTheDocument()
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
describe('ProjectList data attributes', () => {
|
|
45
|
+
it('has correct data-folio-list attribute on root', () => {
|
|
46
|
+
const { container } = render(
|
|
47
|
+
<ProjectList>
|
|
48
|
+
<span>Content</span>
|
|
49
|
+
</ProjectList>
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
expect(container.querySelector('[data-folio-list]')).toBeInTheDocument()
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
describe('ProjectList composition', () => {
|
|
57
|
+
it('composes correctly with ProjectCard children', () => {
|
|
58
|
+
const { container } = render(
|
|
59
|
+
<ProjectList>
|
|
60
|
+
<div data-folio-card>Card 1</div>
|
|
61
|
+
<div data-folio-card>Card 2</div>
|
|
62
|
+
</ProjectList>
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
const list = container.querySelector('[data-folio-list]')
|
|
66
|
+
expect(list).toBeInTheDocument()
|
|
67
|
+
expect(container.querySelectorAll('[data-folio-card]')).toHaveLength(2)
|
|
68
|
+
})
|
|
69
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProjectList } from './ProjectList'
|