mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-19 21:05:16 +00:00
tests: refactor stats card e2e test to avoid future error due to yearly data update (#3612)
* tests: refactor stats card e2e test to avoid future error due to yearly data update * dev
This commit is contained in:
parent
0704b5a58d
commit
319e3d401f
1 changed files with 6 additions and 4 deletions
|
|
@ -20,13 +20,13 @@ const STATS_DATA = {
|
||||||
name: "Cateline Mnemosyne",
|
name: "Cateline Mnemosyne",
|
||||||
totalPRs: 2,
|
totalPRs: 2,
|
||||||
totalReviews: 0,
|
totalReviews: 0,
|
||||||
totalCommits: 1,
|
totalCommits: 15,
|
||||||
totalIssues: 1,
|
totalIssues: 1,
|
||||||
totalStars: 1,
|
totalStars: 1,
|
||||||
contributedTo: 1,
|
contributedTo: 1,
|
||||||
rank: {
|
rank: {
|
||||||
level: "C",
|
level: "C",
|
||||||
percentile: 98.38875766503551,
|
percentile: 98.2625144160878,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -120,11 +120,13 @@ describe("Fetch Cards", () => {
|
||||||
).resolves.not.toThrow();
|
).resolves.not.toThrow();
|
||||||
|
|
||||||
// Get local stats card.
|
// Get local stats card.
|
||||||
const localStatsCardSVG = renderStatsCard(STATS_DATA);
|
const localStatsCardSVG = renderStatsCard(STATS_DATA, {
|
||||||
|
include_all_commits: true,
|
||||||
|
});
|
||||||
|
|
||||||
// Get the Vercel preview stats card response.
|
// Get the Vercel preview stats card response.
|
||||||
const serverStatsSvg = await axios.get(
|
const serverStatsSvg = await axios.get(
|
||||||
`${VERCEL_PREVIEW_URL}/api?username=${USER}&${CACHE_BURST_STRING}`,
|
`${VERCEL_PREVIEW_URL}/api?username=${USER}&include_all_commits=true&${CACHE_BURST_STRING}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if stats card from deployment matches the stats card from local.
|
// Check if stats card from deployment matches the stats card from local.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue