Skip to content

Commit

Permalink
test: fix testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemain committed Jan 31, 2024
1 parent 704c906 commit 176b229
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/github/templates/prOrIssue.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { handlePr, handleIssue } from '@/github/templates';
import { handlePr, handleIssue } from '@/github/templates/prOrIssue';

import {
pull_request_closed,
Expand Down
2 changes: 1 addition & 1 deletion test/github/templates/release.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { handleRelease } from '@/github/templates';
import { handleRelease } from '@/github/templates/release';

import { release_published, antd_mini_release_published } from '../../fixtures';
import { ctx } from '../ctx';
Expand Down
2 changes: 1 addition & 1 deletion test/github/templates/review.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { handleReviewComment } from '@/github/templates';
import { handleReviewComment } from '@/github/templates/comment';

import { pull_request_review_comment_0_created } from '../../fixtures';
import { ctx } from '../ctx';
Expand Down
18 changes: 12 additions & 6 deletions test/queue/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@ describe('queue consumer', () => {
});

interface FakeMessage {
id: number;
name: string;
payload: any;
type: string;
data: {
id: string;
name: string;
payload: any;
};
}

function createMessageBatch() {
const msgs = new Array(100).fill(0).map((_, i) => ({
id: i,
name: 'test',
payload: {},
type: 'test',
data: {
id: `${i}`,
name: 'test',
payload: {},
},
}));

return new MockMessageBatch<FakeMessage>(msgs.map((v) => new MockMessage(v)));
Expand Down

0 comments on commit 176b229

Please sign in to comment.