dahliacreative/react-collapsable

View on GitHub
src/__snapshots__/spec.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Collapsable/> Closes 1`] = `
<Collapsable
  easing="ease-in-out"
  isOpen={false}
  maxAnimationDuration={1}
  minAnimationDuration={0.3}
  speedDivider={1000}
>
  <div
    style={
      Object {
        "height": 500,
        "overflow": "hidden",
        "transition": "height 0.5s ease-in-out",
      }
    }
  >
    <div
      style={
        Object {
          "overflow": "auto",
        }
      }
    >
      <h1>
        My Title
      </h1>
    </div>
  </div>
</Collapsable>
`;

exports[`<Collapsable/> Opens 1`] = `
<Collapsable
  easing="ease-in-out"
  isOpen={true}
  maxAnimationDuration={1}
  minAnimationDuration={0.3}
  speedDivider={1000}
>
  <div
    style={
      Object {
        "height": 0,
        "overflow": "hidden",
        "transition": "height 0s ease-in-out",
      }
    }
  >
    <div
      style={
        Object {
          "overflow": "auto",
        }
      }
    >
      <h1>
        My Title
      </h1>
    </div>
  </div>
</Collapsable>
`;

exports[`<Collapsable/> Renders open by default 1`] = `
<Collapsable
  easing="ease-in-out"
  isOpen={true}
  maxAnimationDuration={1}
  minAnimationDuration={0.3}
  speedDivider={1000}
>
  <div
    style={
      Object {
        "height": 500,
        "overflow": "hidden",
        "transition": "height 0.5s ease-in-out",
      }
    }
  >
    <div
      style={
        Object {
          "overflow": "auto",
        }
      }
    >
      <h1>
        My Title
      </h1>
    </div>
  </div>
</Collapsable>
`;

exports[`<Collapsable/> Renders without crashing 1`] = `
<Collapsable
  easing="ease-in-out"
  isOpen={false}
  maxAnimationDuration={1}
  minAnimationDuration={0.3}
  speedDivider={1000}
>
  <div
    style={
      Object {
        "height": 0,
        "overflow": "hidden",
        "transition": "height 0s ease-in-out",
      }
    }
  >
    <div
      style={
        Object {
          "overflow": "auto",
        }
      }
    >
      <h1>
        My Title
      </h1>
    </div>
  </div>
</Collapsable>
`;

exports[`<Collapsable/> Respects maxAnimationDuration 1`] = `
<Collapsable
  easing="ease-in-out"
  isOpen={true}
  maxAnimationDuration={1}
  minAnimationDuration={0.3}
  speedDivider={1000}
>
  <div
    style={
      Object {
        "height": 0,
        "overflow": "hidden",
        "transition": "height 0s ease-in-out",
      }
    }
  >
    <div
      style={
        Object {
          "overflow": "auto",
        }
      }
    >
      <h1>
        My Title
      </h1>
    </div>
  </div>
</Collapsable>
`;

exports[`<Collapsable/> Respects minAnimationDuration 1`] = `
<Collapsable
  easing="ease-in-out"
  isOpen={true}
  maxAnimationDuration={1}
  minAnimationDuration={0.3}
  speedDivider={1000}
>
  <div
    style={
      Object {
        "height": 0,
        "overflow": "hidden",
        "transition": "height 0s ease-in-out",
      }
    }
  >
    <div
      style={
        Object {
          "overflow": "auto",
        }
      }
    >
      <h1>
        My Title
      </h1>
    </div>
  </div>
</Collapsable>
`;