There is no reason to create an error object here just verifying the name should be enough.

```js
assert.equal(accountErr.name, 'account-exist'); 
```