chore(repo): fix e2e-cli for Windows

This commit is contained in:
Tasos Bekos 2021-02-01 20:04:53 +02:00 committed by Victor Savkin
parent 6bd0c2deac
commit 3d24d56312
2 changed files with 8 additions and 5 deletions

View File

@ -5,6 +5,7 @@ import {
readFile,
readJson,
runCLI,
runCLIAsync,
tmpProjPath,
uniq,
updateFile,
@ -35,7 +36,7 @@ describe('Cli', () => {
expect(() => runCLI(`counter ${myapp} --result=false`)).toThrowError();
});
it('should run npm scripts', () => {
it('should run npm scripts', async () => {
newProject();
const mylib = uniq('mylib');
runCLI(`generate @nrwl/node:lib ${mylib}`);
@ -50,12 +51,14 @@ describe('Cli', () => {
`libs/${mylib}/package.json`,
JSON.stringify({
name: 'mylib1',
scripts: { echo: `echo ECHOED:$1` },
scripts: { echo: `echo ECHOED` },
})
);
const output = runCLI(`echo ${mylib} --a=123`);
expect(output).toContain(`ECHOED: --a=123`);
const { stdout } = await runCLIAsync(`echo ${mylib} --a=123`, {
silent: true,
});
expect(stdout).toMatch(/ECHOED "?--a=123"?/);
}, 1000000);
it('should show help', async () => {

View File

@ -273,7 +273,7 @@ describe('Node Libraries', () => {
runCLI(`build ${nglib}`);
runCLI(`build ${nodelib}`);
checkFilesExist(`./dist/libs/${nodelib}/esm2015/index.js`);
}, 60000);
}, 120000);
it('should fail when trying to compile typescript files that are invalid', () => {
const proj = newProject();