Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/plugin-jsdocs-e2e/tests/__snapshots__/report.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Code PushUp CLI
[ info ] Run collect...
Code PushUp Report - @code-pushup/core@0.57.0
Code PushUp Report - @code-pushup/core@<version>


JSDoc coverage audits
Expand Down
6 changes: 3 additions & 3 deletions e2e/plugin-jsdocs-e2e/tests/collect.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ describe('PLUGIN collect report with jsdocs-plugin NPM package', () => {

expect(code).toBe(0);

expect(removeColorCodes(stdout)).toMatchFileSnapshot(
'__snapshots__/report.txt',
);
expect(
removeColorCodes(stdout).replace(/@\d+\.\d+\.\d+/, '@<version>'),
).toMatchFileSnapshot('__snapshots__/report.txt');

const report = await readJsonFile(
path.join(angularOutputDir, 'report.json'),
Expand Down
2 changes: 1 addition & 1 deletion packages/ci/src/lib/run-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export async function loadCachedBaseReport(

export async function ensureHeadBranch({ refs, git }: RunEnv): Promise<void> {
const { head } = refs;
if ((await git.revparse('HEAD')) !== (await git.revparse(head.ref))) {
if (head.sha !== (await git.revparse('HEAD'))) {
await git.checkout(['-f', head.ref]);
}
}
Expand Down