From 9882a992527199314749115a8d2aa7c3dc9a93a9 Mon Sep 17 00:00:00 2001 From: spaliwal Date: Tue, 12 May 2020 18:07:12 +0530 Subject: [PATCH 1/2] Enable fetching logs for aio app run command --- src/commands/app/run.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/app/run.js b/src/commands/app/run.js index 707734b8..64c5867a 100644 --- a/src/commands/app/run.js +++ b/src/commands/app/run.js @@ -47,7 +47,8 @@ class Run extends BaseCommand { skipActions: !!flags['skip-actions'], parcel: { logLevel: flags.verbose ? 4 : 2 - } + }, + fetchLogs: true } try { From dffa32831cb27bae7a4773da268e44bd8edd4006 Mon Sep 17 00:00:00 2001 From: spaliwal Date: Wed, 13 May 2020 09:46:15 +0530 Subject: [PATCH 2/2] Added test to check if fetchLogs flag is always set when calling scrips runDev --- test/commands/app/run.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/commands/app/run.test.js b/test/commands/app/run.test.js index 18d9d355..e1521b23 100644 --- a/test/commands/app/run.test.js +++ b/test/commands/app/run.test.js @@ -177,6 +177,14 @@ describe('run', () => { })) }) + test('app:run check if fetchLogs flag is set when calling scripts', async () => { + mockFSExists(['web-src/', 'manifest.yml', PRIVATE_KEY_PATH, PUB_CERT_PATH]) + await RunCommand.run([]) + expect(mockScripts.runDev).toHaveBeenCalledWith([], expect.objectContaining({ + fetchLogs: true + })) + }) + test('app:run with -verbose', async () => { mockFSExists(['web-src/', 'manifest.yml', PRIVATE_KEY_PATH, PUB_CERT_PATH]) await RunCommand.run(['--verbose'])