Skip to content

Commit 17e7ef7

Browse files
committed
chore: sync
1 parent b366eaa commit 17e7ef7

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

test/e2e/og-image.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ for (const { path, label } of testCases) {
5757
const imageBuffer = await response.body()
5858
expect(imageBuffer).toMatchSnapshot({
5959
name: `og-image-${path.replace(/\//g, '-').replace(/^-/, '')}.png`,
60+
maxDiffPixelRatio: 0.02,
6061
})
6162
})
6263
})

test/nuxt/components/OgImagePackage.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ vi.mock('~/utils/npm/api', () => ({
1717
fetchNpmDownloadsRange: vi.fn().mockResolvedValue(null),
1818
}))
1919
vi.mock('~/composables/useCharts', () => ({
20+
useCharts: vi.fn().mockReturnValue({
21+
fetchPackageDownloadEvolution: vi.fn().mockResolvedValue([]),
22+
}),
2023
buildRollingWeeklyEvolutionFromDaily: vi.fn().mockReturnValue([]),
2124
smoothPath: vi.fn().mockReturnValue(''),
2225
}))

0 commit comments

Comments
 (0)