check for undefined subErrors

drop node-unit dependency