mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
14 lines
353 B
TypeScript
14 lines
353 B
TypeScript
jest.mock('lodash', () => {
|
|
const original = jest.requireActual('lodash');
|
|
|
|
return {
|
|
...original,
|
|
debounce: (fn) => (...args: any[]) => fn.apply(this, args),
|
|
throttle: (fn) => (...args: any[]) => fn.apply(this, args),
|
|
}
|
|
})
|
|
|
|
export const mockConsoleWarn = jest.fn();
|
|
console.warn = mockConsoleWarn;
|
|
|
|
process.env.NODE_ENV = 'production'; |