refactor: inject the formatError
Cherry-pick https://github.com/vojtajina/testacular/commit/f108799a4d8fd95b8c0250ee83c23ada25d026b9