Skip to content

Commit

Permalink
ran lint command
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushNautiyalDeveloper committed Oct 13, 2023
1 parent 6a53b61 commit a1afe8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
9 changes: 4 additions & 5 deletions src/hooks/command_not_found/myhook.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {Hook} from '@oclif/core'
import {Hook} from '@oclif/core';

const hook: Hook<'command_not_found'> = async function (opts) {
if(opts.id === "help"){ process.stdout.write(`help hook running ${opts.id}\n`)};

}
if (opts.id === 'help') { process.stdout.write(`help hook running ${opts.id}\n`);}
};

export default hook
export default hook;
12 changes: 6 additions & 6 deletions test/hooks/command_not_found/myhook.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {expect, test} from '@oclif/test'
import {expect, test} from '@oclif/test';

describe('hooks', () => {
test
.stdout()
.hook('init', {id: 'mycommand'})
.do(output => expect(output.stdout).to.contain('example hook running mycommand'))
.it('shows a message')
})
.stdout()
.hook('init', {id: 'mycommand'})
.do(output => expect(output.stdout).to.contain('example hook running mycommand'))
.it('shows a message');
});

0 comments on commit a1afe8b

Please sign in to comment.