Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: moving to testing-library in Tree #35674

Merged
merged 1 commit into from
May 25, 2022
Merged

Conversation

dancerphil
Copy link
Contributor

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented May 23, 2022

import debounce from 'lodash/debounce';
import Tree from '../index';
import React from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import 顺序看起来是自动的🤔

@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #35674 (4569405) into next (47d73d8) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              next    #35674   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          469       469           
  Lines         8490      8490           
  Branches      2404      2404           
=========================================
  Hits          8490      8490           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47d73d8...4569405. Read the comment docs.

@zombieJ
Copy link
Member

zombieJ commented May 23, 2022

CI failed in React 18

@dancerphil
Copy link
Contributor Author

rebased

@dancerphil dancerphil changed the title test: moving to testing-library in Tree [WIP]test: moving to testing-library in Tree May 23, 2022
@dancerphil
Copy link
Contributor Author

@zombieJ

react 18 会把 css-motion 运行结束后再匹配 snapshot,所以 dom 结构中不含有 motion 的部分。

不确定为什么 17 和 18 会有这个区别,猜测和 rc-motion 有关(仅猜测)

我是否可以通过在测试中加入额外的 jest.runAllTimers() 跳过动画,使得 react 17 和 react 18 的测试保持一致。同时,这个应该更符合 test 的初衷(测最终结果而不是动画的中间状态)

@dancerphil dancerphil changed the title [WIP]test: moving to testing-library in Tree test: moving to testing-library in Tree May 23, 2022
@zombieJ zombieJ merged commit 8b802bb into ant-design:next May 25, 2022
@zombieJ zombieJ mentioned this pull request May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants