I just started using Jest.
For debugging under testcase file;
describe("Filter function", () => {
test("it should filter by a search", () => {
const input = [
{ id: 1, url: "https://www.google.com" },
{ id: 2, url: "https://www.yahoo.com" },
{ id: 3, url: "https://www.gmail.com" }
];
const output = [{ id: 3, url: "https://www.gmail.com" }];
debugger;
expect(filterByTerm(input, "gmail")).toEqual(output);
debugger;
expect(filterByTerm(input, "GMAIL")).toEqual(output);
});
});
under Project directory - run this command
node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand
After running this command says node --inspect-brk node_modules/jest/bin/jest.js --runInBand Debugger listening on ws://127.0.0.1:9229/ab651461-dfe8-4528-8a07-484a4be5db7b For help, see: https://nodejs.org/en/docs/inspector
after this opened chrome://inspect under it clicked on open dedicated devtools for Node here, It opened window where I added src folder for same and opened test file but debugging didnt came. Help please on same issue
However, in the resulting dev tools window, I can't see anything to debug. I am expecting a process where I can set breakpoints and inspect data.