Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ktrz committed Mar 27, 2024
1 parent 87dacbc commit 1f4122e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/write.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Benchmark } from '../src/extract';
import { DataJson, writeBenchmark } from '../src/write';
import { expect } from '@jest/globals';
import { FakedOctokit, fakedRepos } from './fakedOctokit';
import { wrapBodyWithBenchmarkTags } from '../src/comment/benchmarkCommentTags';

const ok: (x: any, msg?: string) => asserts x = (x, msg) => {
try {
Expand Down Expand Up @@ -771,7 +772,10 @@ describe.each(['https://github.com', 'https://github.enterprise.corp'])('writeBe
// Last line is appended only for failure message
const messageLines = caughtError.message.split('\n');
ok(messageLines.length > 0);
const expectedMessage = messageLines.slice(0, -1).join('\n');
const expectedMessage = wrapBodyWithBenchmarkTags(
'Test benchmark Alert',
messageLines.slice(0, -1).join('\n'),
);
ok(
fakedRepos.spyOpts.length > 0,
`len: ${fakedRepos.spyOpts.length}, caught: ${caughtError.message}`,
Expand Down

0 comments on commit 1f4122e

Please sign in to comment.