nx/e2e/help.test.ts
2019-07-24 10:27:47 -04:00

48 lines
1.5 KiB
TypeScript

import { forEachCli, ensureProject, runCommand, runCLI, cli } from './utils';
forEachCli('nx', () => {
describe('Help', () => {
it('should should help', async () => {
ensureProject();
const mainHelp = runCLI(`--help`);
expect(mainHelp).toContain('Run a target for a project');
expect(mainHelp).toContain('Run task for affected projects');
const genHelp = runCLI(`g @nrwl/web:app --help`);
expect(genHelp).toContain(
'The file extension to be used for style files. (default: css)'
);
const affectedHelp = runCLI(`affected --help`);
expect(affectedHelp).toContain('Run task for affected projects');
const version = runCLI(`--version`);
expect(version).toContain('*'); // stub value
}, 120000);
});
});
forEachCli('angular', () => {
describe('Help', () => {
it('should should help', async () => {
ensureProject();
const mainHelp = runCLI(`--help`);
expect(mainHelp).toContain('Run a target for a project');
expect(mainHelp).toContain('Run task for affected projects');
const genHelp = runCLI(`g @nrwl/web:app --help`);
expect(genHelp).toContain(
'The file extension to be used for style files.'
);
const affectedHelp = runCLI(`affected --help`);
expect(affectedHelp).toContain('Run task for affected projects');
const version = runCLI(`--version`);
expect(version).toContain('*'); // stub value
}, 120000);
});
});