Pull to refresh

Comments 1

Вот бы еще какая-нибудь группировка поддерживалась, типа как в роутерах:

pactum().group('https://api.some.com', async () => {
   this.group('/users/', async () => {
      this.group('/{userID}', async () => {
      	await this.get().expectJsonMatch('name', 'Leanne Graham');
      	await this.post({name: 'John Doe'}).expectJsonMatch('result', 'OK');
      }).withPathParams('userID', 123);
      this.group('/{userID}', async () => {
      	await this.get().expectStatus(404);
      }).withPathParams('userID', 0);
   }).withHeader('X-Auth', 'API-KEY-1234')
}).expectHeader('content-type', 'application-json')

А то очень много повторяющихся блоков будет...

Sign up to leave a comment.