-
Notifications
You must be signed in to change notification settings - Fork 39
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
E2E test application-defined request metadata #2283
E2E test application-defined request metadata #2283
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
e2e/node/request-metadata.test.ts
Outdated
}; | ||
}; | ||
|
||
describe.each(headers)( |
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.
Jest expects an array of arrays here where the nth element of each element array corresponds to the nth argument of the callback function
describe.each(headers)( | |
describe.each(headers.map(header => [header]))( |
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.
The mapping is implicit for 1-D arrays according to the docs: https://jestjs.io/docs/api#1-describeeachtablename-fn-timeout
e2e/node/request-metadata.test.ts
Outdated
readHeaders, | ||
); | ||
|
||
// The response will be a 401 |
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.
if this is a resolves.not.toThrow
is that actually a 401? this comment seems right but the validator seems wrong.
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.
solid-client
acts as a high-level client, and as such it will throw on 401 or 403.
This adds end-to-end tests for application-defined request metadata. The tests scenarios are a combination of authenticated and unauthenticated requests, with success and error responses.