From 9ff01f9b2013dffe3be1db50049f0cfc01470da7 Mon Sep 17 00:00:00 2001 From: Thomas Reichling Date: Thu, 21 Mar 2019 20:52:17 +0100 Subject: [PATCH] fix: remove consola.debug for hooks (#5318) --- packages/core/src/hookable.js | 2 +- packages/core/test/hookable.test.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/hookable.js b/packages/core/src/hookable.js index 10c94eb180..6ccf4e2762 100644 --- a/packages/core/src/hookable.js +++ b/packages/core/src/hookable.js @@ -30,7 +30,7 @@ export default class Hookable { if (!this._hooks[name]) { return } - consola.debug(`Call ${name} hooks (${this._hooks[name].length})`) + try { await sequence(this._hooks[name], fn => fn(...args)) } catch (err) { diff --git a/packages/core/test/hookable.test.js b/packages/core/test/hookable.test.js index 6d8305444e..f1db00f7b5 100644 --- a/packages/core/test/hookable.test.js +++ b/packages/core/test/hookable.test.js @@ -64,7 +64,6 @@ describe('core: hookable', () => { await hook.callHook('test:hook') - expect(consola.debug).toBeCalledWith('Call test:hook hooks (1)') expect(consola.log).toBeCalledWith('test:hook called') })