  We investigate the detectability of atmospheric spectral features of
Earth-like planets in the habitable zone (HZ) around M dwarfs with the future
James Webb Space Telescope (JWST). We use a coupled 1D climate-chemistry-model
to simulate the influence of a range of observed and modelled M-dwarf spectra
on Earth-like planets. The simulated atmospheres served as input for the
calculation of the transmission spectra of the hypothetical planets, using a
line-by-line spectral radiative transfer model. To investigate the
spectroscopic detectability of absorption bands with JWST we further developed
a signal-to-noise ratio (S/N) model and applied it to our transmission spectra.
High abundances of CH$_4$ and H$_2$O in the atmosphere of Earth-like planets
around mid to late M dwarfs increase the detectability of the corresponding
spectral features compared to early M-dwarf planets. Increased temperatures in
the middle atmosphere of mid- to late-type M-dwarf planets expand the
atmosphere and further increase the detectability of absorption bands. To
detect CH$_4$, H$_2$O, and CO$_2$ in the atmosphere of an Earth-like planet
around a mid to late M dwarf observing only one transit with JWST could be
enough up to a distance of 4 pc and less than ten transits up to a distance of
10 pc. As a consequence of saturation limits of JWST and less pronounced
absorption bands, the detection of spectral features of hypothetical Earth-like
planets around most early M dwarfs would require more than ten transits. We
identify 276 existing M dwarfs (including GJ 1132, TRAPPIST-1, GJ 1214, and LHS
1140) around which atmospheric absorption features of hypothetical Earth-like
planets could be detected by co-adding just a few transits. We show that using
transmission spectroscopy, JWST could provide enough precision to be able to
partly characterise the atmosphere of Earth-like TESS planets around mid to
late M dwarfs.
