hello.test.ts 375 B

1234567891011121314151617
  1. import { expect, test } from '@oclif/test'
  2. describe('hello', () => {
  3. test
  4. .stdout()
  5. .command(['hello'])
  6. .it('runs hello', (ctx) => {
  7. expect(ctx.stdout).to.contain('hello world')
  8. })
  9. test
  10. .stdout()
  11. .command(['hello', '--name', 'jeff'])
  12. .it('runs hello --name jeff', (ctx) => {
  13. expect(ctx.stdout).to.contain('hello jeff')
  14. })
  15. })