Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Sep 29, 2023
1 parent 1a6d1ff commit 3243586
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions test/help/show-help.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,6 @@ const test = base
for (const stub of Object.values(ctx.stubs)) stub.restore()
},
}))
.register('setupDeprecatedAliasesHelp', () => ({
async run(ctx: {help: TestHelp; stubs: {[k: string]: SinonStub}}) {
ctx.stubs = {
showRootHelp: stub(TestHelp.prototype, 'showRootHelp').resolves(),
showTopicHelp: stub(TestHelp.prototype, 'showTopicHelp').resolves(),
showCommandHelp: stub(TestHelp.prototype, 'showCommandHelp').resolves(),
}

// use devPlugins: true to bring in plugins-plugin with topic commands for testing
const config = await Config.load({devPlugins: true, root: resolve(__dirname, '..')})
const pluginPlugins = config.plugins.get('@oclif/plugin-plugins')!
const pluginsInstall = pluginPlugins.commands.find((c) => c.id === 'plugins:install')!
pluginPlugins.commands = [...pluginPlugins.commands, {...pluginsInstall, deprecateAliases: true}]
ctx.help = new TestHelp(config)
},
finally(ctx) {
for (const stub of Object.values(ctx.stubs)) stub.restore()
},
}))
.register('makeTopicsWithoutCommand', () => ({
async run(ctx: {help: TestHelp; makeTopicOnlyStub: SinonStub}) {
// by returning no matching command for a subject, it becomes a topic only
Expand Down

0 comments on commit 3243586

Please sign in to comment.