Full Stack Development

👾 Props: Exercise

by Tomas Trescak t.trescak@westernsydney.edu.au

Exercise

Props

Failing Tests

Exercise

Props

Passing Tests

Exercise

Props

    <Greeting name="Tomas" age={50} gender="male" />
<Greeting name="Valeria" gender="female" />

type Props = {}

export function Greeting(props: Props) {
  return <div></div>
}
      
  
index.tsx

Exercise

Props

    dom.it (
  "Renders Other", 
  <Greeting name="Baby" gender="male" age={0} />,
  async function () {
    assert.exists(
      await dom.findByText("Hello Baby, male, age 0")
    );
  }
)
  
index.test.tsx