Skip to content

Commit 0a334bc

Browse files
committed
test(): fix test error reporting
1 parent 1b44b42 commit 0a334bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime/src/internal/bindListeners.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ describe("listenerFactory for handleHttpError", () => {
675675

676676
describe("listenerFactory for event.*", () => {
677677
test("event.preventDefault", () => {
678+
consoleError.mockReturnValue();
678679
const event = { preventDefault: jest.fn() } as any;
679680
listenerFactory(
680681
{
@@ -684,9 +685,11 @@ describe("listenerFactory for event.*", () => {
684685
runtimeContext
685686
)(event);
686687
expect(event.preventDefault).toHaveBeenCalledWith();
688+
consoleError.mockReset();
687689
});
688690

689691
test("event.stopPropagation", () => {
692+
consoleError.mockReturnValue();
690693
const event = { stopPropagation: jest.fn() } as any;
691694
listenerFactory(
692695
{
@@ -695,6 +698,7 @@ describe("listenerFactory for event.*", () => {
695698
runtimeContext
696699
)(event);
697700
expect(event.stopPropagation).toHaveBeenCalledWith();
701+
consoleError.mockReset();
698702
});
699703

700704
test("non-Event object", () => {

0 commit comments

Comments
 (0)