From 980caf4c44e30cdeebd23c60a92032654bbcaf90 Mon Sep 17 00:00:00 2001 From: mkucharz Date: Sun, 14 Oct 2018 18:34:28 +0200 Subject: [PATCH 1/2] chore(cli:hosting): sync files as a default option --- packages/cli/src/commands/hosting-add.js | 2 +- packages/tests/e2e/cli/hosting.test-e2e.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/commands/hosting-add.js b/packages/cli/src/commands/hosting-add.js index db0459b0..ac091453 100644 --- a/packages/cli/src/commands/hosting-add.js +++ b/packages/cli/src/commands/hosting-add.js @@ -63,7 +63,7 @@ class HostingAdd { type: 'confirm', name: 'confirm', message: p(2)('Do you want to sync files now?'), - default: false + default: true }] const response = await inquirer.prompt(syncQuestion) diff --git a/packages/tests/e2e/cli/hosting.test-e2e.js b/packages/tests/e2e/cli/hosting.test-e2e.js index 0524a115..94c73bab 100644 --- a/packages/tests/e2e/cli/hosting.test-e2e.js +++ b/packages/tests/e2e/cli/hosting.test-e2e.js @@ -39,7 +39,7 @@ describe('CLI Hosting', function () { .on(/Do you want to use BrowserRouter/) .respond('\n') .on(/sync files now/) - .respond('\n') + .respond('N\n') .stdout(/sync files use: npx s hosting sync/) .code(0) .end(done) @@ -55,7 +55,7 @@ describe('CLI Hosting', function () { .on(/Do you want to use BrowserRouter/) .respond('\n') .on(/sync files now/) - .respond('\n') + .respond('N\n') .stdout(/sync files use: npx s hosting sync/) .code(0) .end(done) From 434c8a609ca05de4545cf369f1cb0e8ce81c2053 Mon Sep 17 00:00:00 2001 From: mkucharz Date: Sun, 14 Oct 2018 18:51:52 +0200 Subject: [PATCH 2/2] fix(cli:unit): fix tests --- packages/cli/tests/unit/commands-hosting-add.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/tests/unit/commands-hosting-add.test.js b/packages/cli/tests/unit/commands-hosting-add.test.js index d57b2a0e..9137d92e 100644 --- a/packages/cli/tests/unit/commands-hosting-add.test.js +++ b/packages/cli/tests/unit/commands-hosting-add.test.js @@ -172,7 +172,7 @@ describe('[commands] Add Hosting', function () { type: 'confirm', name: 'confirm', message: p(2)('Do you want to sync files now?'), - default: false + default: true } await hostingAdd.syncNewHosting()