diff --git a/e2e/cli/src/cli.test.ts b/e2e/cli/src/cli.test.ts index 31e592de0b..f0b466b86d 100644 --- a/e2e/cli/src/cli.test.ts +++ b/e2e/cli/src/cli.test.ts @@ -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 () => { diff --git a/e2e/node/src/node.test.ts b/e2e/node/src/node.test.ts index 1c2b1ece57..927efa6e8c 100644 --- a/e2e/node/src/node.test.ts +++ b/e2e/node/src/node.test.ts @@ -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();