Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: optionally include id on init
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 5, 2018
1 parent 821b060 commit a436947
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import * as Config from '.'

export interface Hooks {
[event: string]: object
init: {argv: string[]}
init: {
id: string | undefined,
argv: string[],
}
prerun: {
Command: Config.Command.Class
argv: string[]
Expand Down
2 changes: 1 addition & 1 deletion test/typescript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('typescript', () => {
withConfig
.stdout()
.it('runs init hook', async ctx => {
await ctx.config.runHook('init', {argv: ['foo']})
await ctx.config.runHook('init', {id: 'myid', argv: ['foo']})
expect(ctx.stdout).to.equal('running ts init hook\n')
})
})

0 comments on commit a436947

Please sign in to comment.