fix(tests): correctly return the exit code