Lapanti/ts-react-boilerplate

View on GitHub
src/modules/index/__specs__/__snapshots__/IndexView.spec.tsx.snap

Summary

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

exports[`IndexView should render with correct props 1`] = `
<main
  className="index"
>
  <h1
    className="index__header"
  >
    Todo app
  </h1>
  <form
    className="index__form"
    onSubmit={[Function]}
  >
    <label
      className="index__form__label"
      htmlFor="newtodo"
    >
      Add a new todo:
    </label>
    <input
      autoFocus={true}
      className="index__form__input"
      name="newtodo"
      onChange={[Function]}
      type="text"
      value=""
    />
    <Button
      click={[MockFunction]}
      text="Add"
    />
  </form>
  <br />
  <section
    className="index__todo-container"
  />
</main>
`;

exports[`IndexView should render with correct props 2`] = `
<main
  className="index"
>
  <Loader />
  <h1
    className="index__header"
  >
    Todo app
  </h1>
  <form
    className="index__form"
    onSubmit={[Function]}
  >
    <label
      className="index__form__label"
      htmlFor="newtodo"
    >
      Add a new todo:
    </label>
    <input
      autoFocus={true}
      className="index__form__input"
      name="newtodo"
      onChange={[Function]}
      type="text"
      value="A title"
    />
    <Button
      click={[MockFunction]}
      text="Add"
    />
  </form>
  <br />
  <section
    className="index__todo-container"
  >
    <TodoComponent
      key="0"
      setDone={[MockFunction]}
      todo={
        Todo {
          "done": false,
          "id": 0,
          "setDone": [Function],
          "title": "title",
        }
      }
    />
    <TodoComponent
      key="1"
      setDone={[MockFunction]}
      todo={
        Todo {
          "done": true,
          "id": 1,
          "setDone": [Function],
          "title": "testing",
        }
      }
    />
  </section>
</main>
`;