Skip to content

Commit 8d551a3

Browse files
committed
added new max time value
1 parent 8681c62 commit 8d551a3

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/__testing__/mock/constants.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export const MAX_ADD_TIME: number = 60000;
77

88
export const MAX_GEN_CODE_TIME: number = 10000;
99

10-
export const MAX_FAST_TIME: number = 500;
10+
export const MAX_FAST_TIME: number = 1000;
11+
12+
export const MAX_BARELY_NOTICEABLE_TIME: number = 500;
1113

1214
export const MAX_INSTANT_TIME: number = 100;
1315

src/commands/down/down-command.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, beforeEach, jest, test, expect, afterEach } from '@jest/globals';
22

33
import { DownCommand } from './down.command';
4-
import { FileMockUtilities, getMockConstants, MAX_FAST_TIME, MockConstants, inquireMock } from '../../__testing__';
4+
import { FileMockUtilities, getMockConstants, MockConstants, inquireMock, MAX_FAST_TIME, MAX_BARELY_NOTICEABLE_TIME } from '../../__testing__';
55
import { FullyParsedDockerService, getDockerServices } from '../../docker';
66
import { InquirerUtilities } from '../../encapsulation';
77
import { UpCommand } from '../up';
@@ -41,7 +41,7 @@ describe('DownCommand', () => {
4141
const runningDockerServicesAfterDown: FullyParsedDockerService[] = await getDockerServices(false);
4242

4343
expect(runningDockerServicesAfterDown.length).toEqual(runningDockerServicesBeforeUp.length);
44-
}, MAX_FAST_TIME * 2 /** We call up and down. */);
44+
}, MAX_FAST_TIME + MAX_BARELY_NOTICEABLE_TIME /** We call up and down. */);
4545

4646
afterEach(() => {
4747
jest.restoreAllMocks();

src/commands/list/list-command.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, beforeEach, jest, test, afterEach } from '@jest/globals';
22

33
import { ListCommand } from './list.command';
4-
import { FileMockUtilities, getMockConstants, MAX_FAST_TIME, MockConstants, inquireMock } from '../../__testing__';
4+
import { FileMockUtilities, getMockConstants, MAX_BARELY_NOTICEABLE_TIME, MockConstants, inquireMock, MAX_FAST_TIME } from '../../__testing__';
55
import { InquirerUtilities } from '../../encapsulation';
66
import { DownCommand } from '../down';
77
import { UpCommand } from '../up';
@@ -35,7 +35,7 @@ describe('ListCommand', () => {
3535

3636
const command: DownCommand = new DownCommand();
3737
await command.start(['d']);
38-
}, MAX_FAST_TIME * 3 /** We call up, list and down. */);
38+
}, MAX_FAST_TIME + (MAX_BARELY_NOTICEABLE_TIME * 2) /** We call up, list and down. */);
3939

4040
afterEach(() => {
4141
jest.restoreAllMocks();

src/commands/up/up-command.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, beforeEach, jest, test, expect, afterEach } from '@jest/globals';
22

3-
import { FileMockUtilities, getMockConstants, MAX_FAST_TIME, MockConstants, inquireMock } from '../../__testing__';
3+
import { FileMockUtilities, getMockConstants, MAX_BARELY_NOTICEABLE_TIME, MockConstants, inquireMock, MAX_FAST_TIME } from '../../__testing__';
44
import { FullyParsedDockerService, getDockerServices } from '../../docker';
55
import { InquirerUtilities } from '../../encapsulation';
66
import { DownCommand } from '../down';
@@ -41,7 +41,7 @@ describe('UpCommand', () => {
4141
const runningDockerServicesAfterDown: FullyParsedDockerService[] = await getDockerServices(false);
4242

4343
expect(runningDockerServicesAfterDown.length).toEqual(runningDockerServicesBeforeUp.length);
44-
}, MAX_FAST_TIME * 2 /** We call up and down. */);
44+
}, MAX_FAST_TIME + MAX_BARELY_NOTICEABLE_TIME /** We call up and down. */);
4545

4646
afterEach(() => {
4747
jest.restoreAllMocks();

0 commit comments

Comments
 (0)