-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd-angular-website-command.test.ts
More file actions
31 lines (26 loc) · 1.17 KB
/
add-angular-website-command.test.ts
File metadata and controls
31 lines (26 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { afterEach, beforeEach, describe, expect, jest, test } from '@jest/globals';
import { FileMockUtilities, getMockConstants, MAX_ADD_TIME, MockConstants, inquireMock } from '../../../__testing__';
import { InquirerUtilities } from '../../../encapsulation';
import { AddConfiguration, AddType } from '../models';
import { AddAngularWebsiteCommand } from './add-angular-website.command';
const mockConstants: MockConstants = getMockConstants('add-angular-website-command');
describe('AddAngularWebsiteCommand', () => {
beforeEach(async () => {
await FileMockUtilities.setup(mockConstants);
InquirerUtilities['inquire'] = jest.fn(inquireMock({
port: 4200,
subDomain: undefined,
titleSuffix: '| Website',
addTracking: false
}));
});
test('should run', async () => {
const baseConfig: AddConfiguration = { name: 'website', type: AddType.ANGULAR_WEBSITE };
const command: AddAngularWebsiteCommand = new AddAngularWebsiteCommand(baseConfig);
await command.run();
expect(true).toBe(true);
}, MAX_ADD_TIME);
afterEach(() => {
jest.restoreAllMocks();
});
});