-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: dropping support for non-native FormData implementations #199
Changes from 2 commits
a080016
f99294b
b70def1
87a0fb1
65843b2
5083a85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
{ | ||
"files.insertFinalNewline": false, // controlled by the .editorconfig at root since we can't map vscode settings directly to files (see: https://github.com/microsoft/vscode/issues/35350) | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
|
||
// controlled by the .editorconfig at root since we can't map vscode settings directly to files | ||
// https://github.com/microsoft/vscode/issues/35350 | ||
"files.insertFinalNewline": false | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,24 +24,25 @@ export interface CustomFixture { | |
|
||
export const runCustomFixtures = ({ targetId, clientId, tests }: CustomFixture) => { | ||
describe(`custom fixtures for ${targetId}:${clientId}`, () => { | ||
tests.forEach(({ it: title, expected: fixtureFile, options, input: request }) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Had to restructure all of these tests into formal |
||
it.each(tests.map(t => [t.it, t]))('%s', async (_, { expected: fixtureFile, options, input: request }) => { | ||
const opts: HTTPSnippetOptions = {}; | ||
if (options.harIsAlreadyEncoded) { | ||
opts.harIsAlreadyEncoded = options.harIsAlreadyEncoded; | ||
} | ||
|
||
const result = new HTTPSnippet(request, opts).convert(targetId, clientId, options); | ||
const snippet = new HTTPSnippet(request, opts); | ||
await snippet.init(); | ||
|
||
const result = snippet.convert(targetId, clientId, options); | ||
const filePath = path.join(__dirname, '..', 'targets', targetId, clientId, 'fixtures', fixtureFile); | ||
if (process.env.OVERWRITE_EVERYTHING) { | ||
writeFileSync(filePath, String(result)); | ||
} | ||
|
||
it(title, async () => { | ||
const buffer = await readFile(filePath); | ||
const fixture = String(buffer); | ||
const buffer = await readFile(filePath); | ||
const fixture = String(buffer); | ||
|
||
expect(result).toStrictEqual(fixture); | ||
}); | ||
expect(result).toStrictEqual(fixture); | ||
}); | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file here because they use it upstream? This feels like something that should just be in the prettier config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah these snippets have all sorts of frustrating line endings, that are handled in
.editorconfig
, that i fought the upstream maintainers on but they didn't relent.