I could not find my requirement for coverage in the jest docs. I have tried the following options but could not find the required solution to get jest coverage only for changed code.
npm test -- --coverage --onlyChanged
This runs only changed tests but shows coverage for full suite.
npm test -- --coverage --changedSince=base-branch
This runs all tests and shows coverage for full suite.
Found this discussion and it seems this issue is fixed. I am not sure why this is not working though?