How do you debug your JavaScript tests?

1 points by amoitnga ↗ HN
I'm trying to write some tests for react app. The experience seems horrible. How am I even supposed to debug these?

using react-testing-library

```

  import React from "react"
  import { render } from "react-testing-library"
  import App from "./App"


  it("renders welcome message", () => {
    const { getByText } = render(<App />)
    expect(getByText("SIGN IN")).toBeInTheDocument()
  })
```

cool, then what? putting a debugger in there does nothing.

do you really go through the hoops of opening up a window, dev tools, re-running etc... It doesn't work consistently for me.

can't find much good online. do you have any good resources to suggest?

I'm starting to feel like switching jobs and just focusing on back end development.

1 comment

[ 4.9 ms ] story [ 8.0 ms ] thread