Currently, we are facing problem with many pipelines/jobs which has different paths of using methods, envs, etc. Moreover, with each refactor even small ones arise problems with wrong configuration, a bad set of environment variables and so on. This should be somehow tested on unit-level. This verification eliminates copy-paste or previously mentioned errors. One of the solutions is to use JenkinsPipelineUnit which can mock pipelines, sh commands and much more...
Some useful links: