From fb6b6a1b0b941bc29ce9a391d257943f1e3904a5 Mon Sep 17 00:00:00 2001 From: zombieJ Date: Sun, 7 Apr 2019 19:39:04 +0800 Subject: [PATCH] fix: Use mock of lodash.debounce (#15904) * another try * rm mock file --- .gitignore | 4 ++-- components/tree/__tests__/directory.test.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7c56f5e78f..2213de4801 100644 --- a/.gitignore +++ b/.gitignore @@ -35,8 +35,8 @@ yarn.lock package-lock.json components/**/*.js components/**/*.jsx -!components/**/__tests__/*.js -!components/**/__tests__/*.js.snap +!components/**/__tests__/**/*.js +!components/**/__tests__/**/*.js.snap /.history # Docs templates site/theme/template/IconDisplay/*.js diff --git a/components/tree/__tests__/directory.test.js b/components/tree/__tests__/directory.test.js index 0aaf8bc1e8..336ecef412 100644 --- a/components/tree/__tests__/directory.test.js +++ b/components/tree/__tests__/directory.test.js @@ -4,8 +4,9 @@ import Tree from '../index'; const { DirectoryTree, TreeNode } = Tree; +const mockDebounce = jest.mock('lodash/debounce', () => fn => fn); + describe('Directory Tree', () => { - const mockDebounce = jest.mock('lodash/debounce', () => fn => fn); beforeAll(() => { jest.useFakeTimers(); });