improve karma error reporting, add context spec