mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-05-21 05:08:42 +00:00
Update readme
This commit is contained in:
parent
aa111b3c1a
commit
6f18470b65
1 changed files with 5 additions and 2 deletions
|
|
@ -88,13 +88,16 @@ it('makes the party creator the leader automatically', () => {
|
|||
});
|
||||
```
|
||||
|
||||
If the test is checking that the request returns an error, use the `rejectedWith` syntax.
|
||||
If the test is checking that the request returns an error, use the `.eventually.be.rejected.and.eql` syntax.
|
||||
|
||||
```js
|
||||
it('returns an error', () => {
|
||||
let api = requester(user);
|
||||
return expect(request.get('/groups/id-of-a-party-that-user-does-not-belong-to'))
|
||||
.to.be.rejectedWith('Group not found or you don\'t have access.');
|
||||
.to.eventually.be.rejected.and.eql({
|
||||
code: 404,
|
||||
text: t('messageGroupNotFound'),
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue