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

Commit a436947

Browse files
committed
fix: optionally include id on init
1 parent 821b060 commit a436947

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/hooks.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import * as Config from '.'
22

33
export interface Hooks {
44
[event: string]: object
5-
init: {argv: string[]}
5+
init: {
6+
id: string | undefined,
7+
argv: string[],
8+
}
69
prerun: {
710
Command: Config.Command.Class
811
argv: string[]

test/typescript.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('typescript', () => {
2828
withConfig
2929
.stdout()
3030
.it('runs init hook', async ctx => {
31-
await ctx.config.runHook('init', {argv: ['foo']})
31+
await ctx.config.runHook('init', {id: 'myid', argv: ['foo']})
3232
expect(ctx.stdout).to.equal('running ts init hook\n')
3333
})
3434
})

0 commit comments

Comments
 (0)