Skip to content

Commit

Permalink
style: check:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordfirespeed committed Aug 20, 2024
1 parent f4ebdd6 commit 4c1eed0
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions tests/parsers/multipart-form-data.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, it } from 'vitest'

import {ParsedFormFieldFileList, parseMultipartFormData} from "@/parsers/multipart-form-data";
import { parseMultipartFormData } from '@/parsers/multipart-form-data'

it('should parse valid multipart form data with a single part', () => {
const multipart = [
Expand All @@ -17,13 +17,13 @@ it('should parse valid multipart form data with a single part', () => {

expect(parseMultipartFormData(Buffer.from(multipart), 'boundary')).toMatchObject({
foo: {
fieldName: "foo",
type: "field-value",
fieldName: 'foo',
type: 'field-value',
value: {
headers: {},
content: Buffer.from('{ "foo": "bar" }')
}
}
content: Buffer.from('{ "foo": "bar" }'),
},
},
})
})

Expand All @@ -49,23 +49,23 @@ it('should parse valid multipart form data with multiple parts', () => {
const result = parseMultipartFormData(Buffer.from(multipart), 'boundary')
expect(result).toMatchObject({
foo: {
fieldName: "foo",
type: "field-value",
fieldName: 'foo',
type: 'field-value',
value: {
headers: {},
content: Buffer.from('{ "foo": "bar" }')
}
content: Buffer.from('{ "foo": "bar" }'),
},
},
bar: {
fieldName: "bar",
type: "field-file-list",
fieldName: 'bar',
type: 'field-file-list',
files: [
{
filename: "baz",
content: Buffer.from("foo bar baz\r\n"),
headers: {}
}
]
}
filename: 'baz',
content: Buffer.from('foo bar baz\r\n'),
headers: {},
},
],
},
})
})
})

0 comments on commit 4c1eed0

Please sign in to comment.