Open cdimitroulas opened 2 years ago
would welcome a PR for this. :)
Will try to find some time to look into this
@benmonro I tried to dig into this a bit but wasn't able to make much progress.
I tried to replicate the tests from here as a starting point but I wasn't able to figure out how to capture the error message which includes a printout of the DOM in the test code since that error occurs on the client-side when running with testcafe.
Similarly, the way the DEBUG_PRINT_LIMIT works in testing-library/dom is by looking for process.env.DEBUG_PRINT_LIMIT
which makes sense in a Node.js environment but is slightly weirder on the client-side. The only idea I had was to try setting up a window.process.env
object on the client-side and pass this env var to the client-side somehow. Do you have any advice on how this could be done nicely with testcafe?
Is your feature request related to a problem? Please describe. Other testing-library libs have the ability to configure the size of the debug output by using the
DEBUG_PRINT_LIMIT
env variable. This doesn't seem to work with testcafe-testing-library.Describe the solution you'd like Allow setting
DEBUG_PRINT_LIMIT
to increase the size of the default debug print when selectors likegetByText
fail to find an element.Describe alternatives you've considered N/A
Additional context N/A