-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f37e5ac
commit 634ca19
Showing
8 changed files
with
725 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import {expect, test} from '@oclif/test' | ||
import {runCommand} from '@oclif/test' | ||
import {expect} from 'chai' | ||
|
||
describe('esm1 (@oclif/plugin-test-esm-1)', () => { | ||
test | ||
.stdout() | ||
.command(['esm1']) | ||
.it('runs esm1 cmd from @oclif/plugin-test-esm-1', (ctx) => { | ||
expect(ctx.stdout).to.contain('hello I am an ESM plugin from') | ||
}) | ||
it('runs esm1 cmd from @oclif/plugin-test-esm-1', async () => { | ||
const {stdout} = await runCommand(['esm1']) | ||
expect(stdout).to.contain('hello I am an ESM plugin from') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import {expect, test} from '@oclif/test' | ||
import {runCommand} from '@oclif/test' | ||
import {expect} from 'chai' | ||
|
||
describe('esbuild', () => { | ||
test | ||
.stdout() | ||
.command(['esbuild']) | ||
.it('runs esbuild cmd', (ctx) => { | ||
expect(ctx.stdout).to.contain('hello I am a bundled (esbuild) plugin') | ||
}) | ||
it('runs esbuild cmd', async () => { | ||
const {stdout} = await runCommand('esbuild') | ||
expect(stdout).to.contain('hello I am a bundled (esbuild) plugin') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import {expect, test} from '@oclif/test' | ||
import {runCommand} from '@oclif/test' | ||
import {expect} from 'chai' | ||
|
||
describe('hello', () => { | ||
test | ||
.stdout() | ||
.command(['hello', 'friend', '--from=oclif']) | ||
.it('runs hello cmd', ctx => { | ||
expect(ctx.stdout).to.contain('hello friend from oclif!') | ||
it('runs hello cmd', async () => { | ||
const {stdout} = await runCommand(['hello', 'friend', '--from=oclif']) | ||
expect(stdout).to.contain('hello friend from oclif!') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
import {expect, test} from '@oclif/test' | ||
import {runCommand} from '@oclif/test' | ||
import {expect} from 'chai' | ||
|
||
describe('hello world', () => { | ||
test | ||
.stdout() | ||
.command(['hello:world']) | ||
.it('runs hello world cmd', (ctx) => { | ||
expect(ctx.stdout).to.contain('hello world!') | ||
}) | ||
it('runs hello world cmd', async () => { | ||
const {stdout} = await runCommand(['hello:world']) | ||
expect(stdout).to.contain('hello world!') | ||
}) | ||
}) | ||
|
||
describe('hello alias', () => { | ||
test | ||
.stdout() | ||
.command(['hello:alias']) | ||
.it('runs hello alias cmd', (ctx) => { | ||
expect(ctx.stdout).to.contain('hello world!') | ||
}) | ||
it('runs hello alias cmd', async () => { | ||
const {stdout} = await runCommand(['hello:alias']) | ||
expect(stdout).to.contain('hello world!') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import {expect, test} from '@oclif/test' | ||
import {runHook} from '@oclif/test' | ||
import {expect} from 'chai' | ||
|
||
describe('hooks (@oclif/plugin-test-esm-1)', () => { | ||
test | ||
.stdout() | ||
.hook('init', {id: 'mycommand'}) | ||
.do((output) => expect(output.stdout).to.contain('Greetings! from plugin-test-esm-1 init hook')) | ||
.it('shows a message') | ||
it('shows a message', async () => { | ||
const {stdout} = await runHook('init', {id: 'mycommand'}) | ||
expect(stdout).to.contain('Greetings! from plugin-test-esm-1 init hook') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import {expect, test} from '@oclif/test' | ||
import {runHook} from '@oclif/test' | ||
import {expect} from 'chai' | ||
|
||
describe('hooks', () => { | ||
test | ||
.stdout() | ||
.hook('init', {id: 'mycommand'}) | ||
.do((output) => expect(output.stdout).to.contain('Greetings! from plugin-test-esbuild init hook')) | ||
.it('shows a message') | ||
it('shows a message', async () => { | ||
const {stdout} = await runHook('init', {id: 'mycommand'}) | ||
expect(stdout).to.contain('Greetings! from plugin-test-esbuild init hook') | ||
}) | ||
}) |
Oops, something went wrong.