Unit test for the check_n_jobs function.