From 10f767342429e275c2c000482996960e4e32f0c8 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Mon, 27 Sep 2021 10:43:23 -0400 Subject: [PATCH] #25: Redo tunit tests to reflect mvp code switching --- cli/commands/install.js | 2 +- test/commands/hello.test.js | 17 ----------------- test/commands/install.test.js | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 test/commands/hello.test.js create mode 100644 test/commands/install.test.js diff --git a/cli/commands/install.js b/cli/commands/install.js index eb7181b..c287ea2 100644 --- a/cli/commands/install.js +++ b/cli/commands/install.js @@ -10,7 +10,7 @@ class InstallCommand extends Command { async run() { const {flags} = this.parse(InstallCommand); const name = flags.name || 'world'; - this.log(`goodbye ${name} from ./src/commands/hello.js`); + this.log('install plugin'); } } diff --git a/test/commands/hello.test.js b/test/commands/hello.test.js deleted file mode 100644 index 4411bff..0000000 --- a/test/commands/hello.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const {expect, test} = require('@oclif/test'); - -describe('hello', () => { - test - .stdout() - .command(['hello']) - .it('runs hello', ctx => { - expect(ctx.stdout).to.contain('hello world'); - }); - - test - .stdout() - .command(['hello', '--name', 'jeff']) - .it('runs hello --name jeff', ctx => { - expect(ctx.stdout).to.contain('hello jeff'); - }); -}); diff --git a/test/commands/install.test.js b/test/commands/install.test.js new file mode 100644 index 0000000..90621e9 --- /dev/null +++ b/test/commands/install.test.js @@ -0,0 +1,17 @@ +const {expect, test} = require('@oclif/test'); + +describe('install', () => { + test + .stdout() + .command(['install']) + .it('runs install', ctx => { + expect(ctx.stdout).to.contain('install plugin'); + }); + + test + .stdout() + .command(['install', 'docker-desktop']) + .it('runs install docker-desktop', ctx => { + expect(ctx.stdout).to.contain('install docker-desktop'); + }); +});