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

chore(test): add http strategy tests #8699

Conversation

martinschaer
Copy link
Contributor

☕️ Reasoning

Surrealdb.js supports socket and HTTP connections. This PR includes unit tests for both types of connections.

🧢 Checklist

🎫 Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

@vercel
Copy link

vercel bot commented Sep 23, 2023

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

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 24, 2023 2:47am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Sep 24, 2023 2:47am

@vercel
Copy link

vercel bot commented Sep 23, 2023

@martinschaer is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the adapters Changes related to the core code concerning database adapters label Sep 23, 2023
import { runBasicTests } from "@auth/adapter-test"
import fetch from "node-fetch"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not use node-fetch here? tests were passing for me even without it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this PR we need to wait for surrealdb.js to merge this other PR: surrealdb/surrealdb.js#171

I tested it using my fork with the fix

Copy link
Member

@balazsorban44 balazsorban44 Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import fetch from "node-fetch"

node-fetch (or any other fetch polyfill) indeed is not necessary anymore, as all Node.js versions have fetch already available.

@balazsorban44 balazsorban44 changed the title feat(adapter-surrealdb): add http strategy test chore(test): add http strategy tests Sep 26, 2023
@martinschaer
Copy link
Contributor Author

Can we close this PR in favor of this one? #8823

Sorry for the mess...

Also, looks like node 18.18.0 still requires node-fetch, so I kept it for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants