Skip to content

Commit

Permalink
test(client) - user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
rumblefrog committed Jun 10, 2021
1 parent 85d3358 commit 7eebda3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,13 @@ test('Request headers', async () => {
expect(body.headers.Lemon).toBe('strawberry');
});

test('Request User Agent', async () => {
let ret = await client.request('https://httpbin.org/user-agent');

expect(ret.status).toBe(200);

let body = JSON.parse(ret.data);

expect(body['user-agent']).toBe('Glub Glub');
});

0 comments on commit 7eebda3

Please sign in to comment.