Page 1 of 2
How to test external libraries?
An example application uses
AG-Grid
to manage and display tables, grids, and charts. Here's an example table showing the app's users:
Read the component code for that component, which also uses TanstackQuery to fetch the data from the back-end:
Now, take a look at one of its component tests:
Considering long-term sustainability, what part of that needs improvement the most?
*
A
The dependency injection - the adapter isn't flexible enough for all test scenarios
B
The assertions - they don't provide enough protection against regressions
C
The interaction with UI - There's a lot of repetitive code that also depends on AG-Grid's internal roles
D
The users array size - it is too small and does not help testing performance
Submit