Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
fix: use lowercase encoding name
Browse files Browse the repository at this point in the history
  • Loading branch information
KnisterPeter committed Oct 29, 2021
1 parent 6179763 commit 1398cd0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ test('Pretend should call a post method with FormData', async () => {
.reply(200, mockResponse);

const response = await test.postWithFormData(
Buffer.alloc(10).toString('UTF-8')
Buffer.alloc(10).toString('utf-8')
);

expect(response).toEqual(mockResponse);
Expand All @@ -264,7 +264,7 @@ test('Pretend should call a post method with FormData and query', async () => {

const response = await test.postWithFormDataAndQuery(
{ query: 'params' },
Buffer.alloc(10).toString('UTF-8')
Buffer.alloc(10).toString('utf-8')
);

expect(response).toEqual(mockResponse);
Expand Down Expand Up @@ -520,7 +520,7 @@ test('Pretend should call a post method with FormData body', async () => {
const test = setup();

const formData = new FormData();
formData.append('name', Buffer.alloc(10).toString('UTF-8'));
formData.append('name', Buffer.alloc(10).toString('utf-8'));
nock('http://host:port/', {
reqheaders: {
'Content-Type': /^multipart\/form-data/
Expand All @@ -529,9 +529,7 @@ test('Pretend should call a post method with FormData body', async () => {
.post('/path', /Content-Disposition: form-data; name="name"/)
.reply(200, mockResponse);

const response = await test.post(
formData
);
const response = await test.post(formData);

expect(response).toEqual(mockResponse);
});

0 comments on commit 1398cd0

Please sign in to comment.