Plants of mustard family contain glucosinolates, which when decomposed are converted to biologically active component isothiocyanate, a natural fumigant for pests.
you will find several papers on the biological activity of isothiocyanates, especially on its action against helminths/nematodes.
Aissani et al. determined nematicidal activity of allylisothiocyanate against Meloidogyne incognita (PMID:23627288). Similar effects have been seen in Anisakis larvae (PMID:
25836403).
However, at lower concentrations, allylisothiocyanate can increase stress resistance (also against juglon, a known nematicide!)PMID:20174640.
As seen in other organisms like bacteria, also nematodes seems to gain resistance against isothiocyanates when doses are too low.