How to use the react-testing-library.renderIntoDocument function in react-testing-library

To help you get started, we’ve selected a few react-testing-library examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ticketmaster / aurora / src / components / Input / __tests__ / RadioButton.spec.js View on Github external
it("renders input with custom label", () => {
    expect(
      renderIntoDocument(
        
          
            RadioButton Label
            <p style="{{"></p>
github ticketmaster / aurora / src / components / Input / __tests__ / CheckBoxGroup.spec.js View on Github external
function renderGroupComponent(CheckBoxGroupProps = {}, CheckBoxProps = {}) {
    const defaultCheckBoxProps = {
      name: "something",
      "data-testid": "test-checkbox",
      value: "else",
      size: "large",
      index: 0
    };

    return renderIntoDocument(
      
        
          
        
      
    );
  }
github ticketmaster / aurora / src / components / Input / __tests__ / DropDownGroup.spec.js View on Github external
function renderTestComponentOne(props = {}) {
    return renderIntoDocument(
      <div data-testid="test-outSideComponent">
        <div data-testid="something">something</div>
        
          
            Option One
          
          
            Second Option</div>
github ticketmaster / aurora / src / components / Input / __tests__ / DropDownGroup.spec.js View on Github external
function renderTestComponentTwo(props = {}) {
    return renderIntoDocument(
      
        
          {"Date"}
          {null}
        
        
          {"Distance - "}
          {"Closest"}
        
        
          {"Price "}
          {<span>On sale</span>}
github ticketmaster / aurora / src / components / Input / __tests__ / CheckBoxGroup.spec.js View on Github external
function renderCheckBox(props = {}) {
    return renderIntoDocument(
      
        
      
    );
  }
github ticketmaster / aurora / src / components / Input / __tests__ / RadioButton.spec.js View on Github external
function renderGroupComponent(props = {}) {
    return renderIntoDocument(
      
        
      
    );
  }
});