mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 00:21:07 +08:00
Update interaction-testing.md
This commit is contained in:
parent
aef3aaff50
commit
ed1e277bf9
@ -171,6 +171,10 @@ Once you're ready to push your code into a pull request, you'll want to automati
|
||||
|
||||
Interaction tests can be expensive to maintain when applied wholesale to every component. We recommend combining them with other methods like visual testing for comprehensive coverage with less maintenance work.
|
||||
|
||||
#### What's the difference between interaction tests and using Jest + Testing Library alone?
|
||||
|
||||
Interaction tests integrate Jest and Testing Library into Storybook. The biggest benefit is the ability to view the component you're testing in a real browser. That helps you debug visually, instead of getting a dump of the (fake) DOM in the command line. You also avoid the limitations of how JSDOM mocks browser functionality. It's also more convenient to keep stories and tests together in one file than having them spread across files.
|
||||
|
||||
#### Learn about other UI tests
|
||||
|
||||
- [Test runner](./test-runner.md) to automate test execution
|
||||
|
Loading…
x
Reference in New Issue
Block a user