To see all the following in action, run yarn install (or npm install) followed by yarn test (or npx jest --coverage) to collect coverage.
See ./package.json testPathIgnorePatterns. It ignores the contents of src/testignore, which actually just contains a failing test in ./src/testignore/ignored-test.test.js.
See ./package.json collectCoverageFrom. It does not collect coverage from ./src/config-ignore-me.js.
See ./src/comment-ignored.js. It uses the comment notation to ignore the file.
See [./src/snippet.js]. It showcases the istanbul ignore next and istanbul ignore [type] syntax (in this case istanbul ignore else).