Skip to content

Commit

Permalink
refactor(ui/jest): fix types
Browse files Browse the repository at this point in the history
affects: @varlet/ui
  • Loading branch information
haoziqaq committed Nov 29, 2021
1 parent e6f8f2c commit 827cb0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/varlet-ui/src/utils/jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ export function mockStubs() {
}
}

export function mockConsole(method: keyof Console, fn = () => {}) {
export function mockConsole(method: keyof Console, fn: any = () => {}) {
const originMethod = console[method]

console[method] = fn

return {
mockRestore() {
console[method] = originMethod
console[method] = originMethod as any
},
}
}
Expand Down

0 comments on commit 827cb0a

Please sign in to comment.