Skip to content

Commit 03097ae

Browse files
authored
remove completions (#41)
1 parent 8925ce9 commit 03097ae

File tree

4 files changed

+0
-204
lines changed

4 files changed

+0
-204
lines changed

src/completions.ts

Lines changed: 0 additions & 177 deletions
This file was deleted.

src/flags/app.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {flags} from '@oclif/command'
22
import {CLIError, error} from '@oclif/errors'
33

4-
import {AppCompletion, RemoteCompletion} from '../completions'
54
import {configRemote, getGitRemotes, IGitRemotes} from '../git'
65

76
class MultipleRemotesError extends CLIError {
@@ -21,7 +20,6 @@ class MultipleRemotesError extends CLIError {
2120

2221
export const app = flags.build({
2322
char: 'a',
24-
completion: AppCompletion,
2523
description: 'app to run command against',
2624

2725
default: ({options, flags}) => {
@@ -40,6 +38,5 @@ export const app = flags.build({
4038

4139
export const remote = flags.build({
4240
char: 'r',
43-
completion: RemoteCompletion,
4441
description: 'git remote of app to use',
4542
})

src/flags/team.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import {flags} from '@oclif/command'
22

3-
import {TeamCompletion} from '../completions'
4-
53
export const team = flags.build({
64
char: 't',
7-
completion: TeamCompletion,
85
description: 'team to use',
96

107
default: ({flags}) => {

test/flags/app.test.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Config from '@oclif/config'
21
import {expect, fancy} from 'fancy-test'
32
import nock from 'nock'
43

@@ -145,23 +144,3 @@ describe('optional', () => {
145144
}.run([])
146145
})
147146
})
148-
149-
describe('completion', () => {
150-
class Command extends Base {
151-
static flags = {app: flags.app({})}
152-
async run() {}
153-
}
154-
155-
it('cacheDuration defaults to 1 day', () => {
156-
const completion = Command.flags.app.completion!
157-
const duration = completion.cacheDuration
158-
expect(duration).to.equal(86400)
159-
})
160-
161-
it('options returns all the apps', async () => {
162-
const completion = Command.flags.app.completion!
163-
api.get('/apps').reply(200, [{id: 1, name: 'foo'}, {id: 2, name: 'bar'}])
164-
const options = await completion.options({config: await Config.load()})
165-
expect(options).to.deep.equal(['bar', 'foo'])
166-
})
167-
})

0 commit comments

Comments
 (0)