Skip to content
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

Merged
merged 6 commits into from
Dec 14, 2023

Conversation

NSeydoux
Copy link
Contributor

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.

@NSeydoux NSeydoux requested a review from a team as a code owner December 13, 2023 15:26
Copy link

vercel bot commented Dec 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
solid-client-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2023 11:07am

};
};

describe.each(headers)(
Copy link
Contributor

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

Suggested change
describe.each(headers)(
describe.each(headers.map(header => [header]))(

Copy link
Contributor Author

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

readHeaders,
);

// The response will be a 401
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@NSeydoux NSeydoux merged commit 22ab3be into main Dec 14, 2023
29 checks passed
@NSeydoux NSeydoux deleted the feat/SDK-3263/application-defined-request-metadata branch December 14, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants