tests: add error instanceof test