-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Expand file tree
/
Copy pathmodule-basic.ts
More file actions
23 lines (20 loc) · 1.08 KB
/
module-basic.ts
File metadata and controls
23 lines (20 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { join } from 'node:path';
import { ng } from '../../../utils/process';
import { expectFileToExist, expectFileToMatch } from '../../../utils/fs';
import { expectToFail } from '../../../utils/utils';
import { useCIChrome, useCIDefaults } from '../../../utils/project';
export default async function () {
const projectName = 'test-project-two';
const moduleDir = `projects/${projectName}/src/app/test`;
await ng('generate', 'application', projectName, '--no-standalone', '--skip-install');
await useCIDefaults(projectName);
await useCIChrome(projectName, 'projects/test-project-two');
await ng('generate', 'module', 'test', '--project', projectName);
await expectFileToExist(moduleDir);
await expectFileToExist(join(moduleDir, 'test-module.ts'));
await expectToFail(() => expectFileToExist(join(moduleDir, 'test-routing-module.ts')));
await expectToFail(() => expectFileToExist(join(moduleDir, 'test.spec.ts')));
await expectFileToMatch(join(moduleDir, 'test-module.ts'), 'TestModule');
// Try to run the unit tests.
await ng('test', projectName, '--watch=false');
}