-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
output-style.test.ts
43 lines (39 loc) · 1004 Bytes
/
output-style.test.ts
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
32
33
34
35
36
37
38
39
40
41
42
43
import {
isNotWindows,
newProject,
readFile,
readJson,
runCLI,
runCLIAsync,
runCommand,
tmpProjPath,
uniq,
updateFile,
updateProjectConfig,
} from '@nrwl/e2e/utils';
import { renameSync } from 'fs';
import { packagesWeCareAbout } from 'nx/src/command-line/report';
describe('Output Style', () => {
beforeEach(() => newProject());
it('should stream output', async () => {
const myapp = uniq('myapp');
runCLI(`generate @nrwl/web:app ${myapp}`);
updateProjectConfig(myapp, (c) => {
c.targets['counter'] = {
executor: '@nrwl/workspace:counter',
options: {
to: 2,
},
};
return c;
});
const withPrefixes = runCLI(
`counter ${myapp} --result=true --output-style=stream`
);
expect(withPrefixes).toContain(`[${myapp}`);
const noPrefixes = runCLI(
`counter ${myapp} --result=true --output-style=stream-without-prefixes`
);
expect(noPrefixes).not.toContain(`[${myapp}`);
});
});