Skip to content

Commit

Permalink
test: update remaining command & config imports to core (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
RasPhilCo authored Feb 25, 2021
1 parent 5292ed1 commit 16c0350
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/help/fixtures/fixtures.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Command} from '@oclif/command'
import {Topic} from '@oclif/config'
import {Command} from '../../../src'
import {Topic} from '../../../src/interfaces'

// apps

Expand Down
7 changes: 3 additions & 4 deletions test/help/format-commands.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Command} from '../../src'
import * as Config from '@oclif/config'
import {Command, Interfaces} from '../../src'
import {expect, test as base} from '@oclif/test'
import stripAnsi = require('strip-ansi')

Expand All @@ -10,15 +9,15 @@ import {AppsDestroy, AppsCreate} from './fixtures/fixtures'

// extensions to expose method as public for testing
class TestHelp extends Help {
public formatCommands(commands: Config.Command[]) {
public formatCommands(commands: Interfaces.Command[]) {
return super.formatCommands(commands)
}
}

const test = base
.loadConfig()
.add('help', ctx => new TestHelp(ctx.config as any))
.register('formatCommands', (commands: Config.Command[] = []) => ({
.register('formatCommands', (commands: Interfaces.Command[] = []) => ({
run(ctx: {help: TestHelp; output: string}) {
const help = ctx.help.formatCommands(commands)
if (process.env.TEST_OUTPUT === '1') {
Expand Down

0 comments on commit 16c0350

Please sign in to comment.