Emitter emits event in the meta (#14203)

* Emitter emits event in the meta

* Update unit test
This commit is contained in:
ian
2022-06-30 22:12:42 +08:00
committed by GitHub
parent 184d312f84
commit e14a6ea401
2 changed files with 14 additions and 9 deletions

View File

@@ -57,10 +57,10 @@ describe('cli hooks', () => {
const program = await setup();
expect(beforeHook).toHaveBeenCalledTimes(1);
expect(beforeHook).toHaveBeenCalledWith({ program });
expect(beforeHook).toHaveBeenCalledWith({ event: 'cli.before', program });
expect(afterHook).toHaveBeenCalledTimes(1);
expect(afterHook).toHaveBeenCalledWith({ program });
expect(afterHook).toHaveBeenCalledWith({ event: 'cli.after', program });
});
test('should be able to add a custom cli command', async () => {