Update tests

This commit is contained in:
Mateusz Gorzeliński 2023-08-18 11:32:04 +02:00
parent 64ab955339
commit 4f1530234c
2 changed files with 12 additions and 1 deletions

View File

@ -1298,11 +1298,13 @@ test('when the option "ignoreReactions" is set to false, stale label should be r
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
['Stale']
)
];
const processor = new IssuesProcessorMock(
opts,
alwaysFalseStateMock,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => [
@ -1332,11 +1334,13 @@ test('when the option "ignoreReactions" is not set, stale label should not be re
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
['Stale']
)
];
const processor = new IssuesProcessorMock(
opts,
alwaysFalseStateMock,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => [
@ -1370,11 +1374,13 @@ test('when the option "ignoreReactions" is set to true, stale label should not b
'2020-01-01T17:00:00Z',
'2020-01-01T17:00:00Z',
false,
false,
['Stale']
)
];
const processor = new IssuesProcessorMock(
opts,
alwaysFalseStateMock,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => [

View File

@ -51,6 +51,7 @@ describe('state', (): void => {
state,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => [],
async () => new Date().toDateString()
);
@ -78,6 +79,7 @@ describe('state', (): void => {
state,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => [],
async () => new Date().toDateString()
);
@ -117,6 +119,7 @@ describe('state', (): void => {
state,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => [],
async () => new Date().toDateString()
);
@ -159,6 +162,7 @@ describe('state', (): void => {
state,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => [],
async () => new Date().toDateString()
);
@ -197,12 +201,13 @@ describe('state', (): void => {
state,
async p => (p === 1 ? TestIssueList : []),
async () => [],
async () => [],
async () => new Date().toDateString()
);
await processor.processIssues(1);
// make sure all issues are proceeded
expect(infoSpy.mock.calls[71][0]).toContain(
expect(infoSpy.mock.calls[73][0]).toContain(
'No more issues found to process. Exiting...'
);