Browse Source

fix: Use mock of lodash.debounce (#15904)

* another try

* rm mock file
pull/15912/head
zombieJ 6 years ago
committed by GitHub
parent
commit
fb6b6a1b0b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .gitignore
  2. 3
      components/tree/__tests__/directory.test.js

4
.gitignore

@ -35,8 +35,8 @@ yarn.lock
package-lock.json package-lock.json
components/**/*.js components/**/*.js
components/**/*.jsx components/**/*.jsx
!components/**/__tests__/*.js !components/**/__tests__/**/*.js
!components/**/__tests__/*.js.snap !components/**/__tests__/**/*.js.snap
/.history /.history
# Docs templates # Docs templates
site/theme/template/IconDisplay/*.js site/theme/template/IconDisplay/*.js

3
components/tree/__tests__/directory.test.js

@ -4,8 +4,9 @@ import Tree from '../index';
const { DirectoryTree, TreeNode } = Tree; const { DirectoryTree, TreeNode } = Tree;
const mockDebounce = jest.mock('lodash/debounce', () => fn => fn);
describe('Directory Tree', () => { describe('Directory Tree', () => {
const mockDebounce = jest.mock('lodash/debounce', () => fn => fn);
beforeAll(() => { beforeAll(() => {
jest.useFakeTimers(); jest.useFakeTimers();
}); });

Loading…
Cancel
Save