You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to run testing-library tests against components which use the splitter?
For example, consider the following test:
import{render,screen}from"@testing-library/react";importSplitter,{SplitDirection}from'@devbookhq/splitter'// ResizeObserver is required by DevbookHQ's Splitter component.// Mock it by using the resize-observer-polyfill installed here as a dev dependency.global.ResizeObserver=require("resize-observer-polyfill");describe("Splitter",()=>{it("works as expected",()=>{render(<Splitterdirection={SplitDirection.Vertical}><div>Tile 1</div><div>Tile 2</div></Splitter>);expect(screen.getByText(/Tile1/i)).toBeInTheDocument();});});
When the above test is executed, it fails as the render function generates the following HTML, which is missing the two tile divs:
Hey, I haven't tried any testing library with Splitter. Personally, I don't have experience with the testing-library so I cannot really answer your question well.
Is it possible to run
testing-library
tests against components which use the splitter?For example, consider the following test:
When the above test is executed, it fails as the render function generates the following HTML, which is missing the two tile divs:
The text was updated successfully, but these errors were encountered: