From e285f446d67d849692c984e4825bf0d70d2302a9 Mon Sep 17 00:00:00 2001 From: qinmu Date: Sun, 3 Jul 2022 16:16:56 +0800 Subject: [PATCH] fix: revert back the patching of console.log --- test/runtime/samples/empty-component-destroy/_config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/runtime/samples/empty-component-destroy/_config.js b/test/runtime/samples/empty-component-destroy/_config.js index 0334ab2e80..ca47a00baf 100644 --- a/test/runtime/samples/empty-component-destroy/_config.js +++ b/test/runtime/samples/empty-component-destroy/_config.js @@ -7,11 +7,13 @@ export default { const button = target.querySelector('button'); const event = new window.MouseEvent('click'); const messages = []; + const log = console.log; console.log = msg => messages.push(msg); await button.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ` `); assert.deepEqual(messages, ['destroy']); + console.log = log; } };