-
Notifications
You must be signed in to change notification settings - Fork 344
feat(repo,testing): Apply testing tokens to E2E tests #5561
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
Conversation
🦋 Changeset detectedLatest commit: 4b88762 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
84e82d0
to
ef8eca4
Compare
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.
Great job! 🚀
@@ -5,24 +5,29 @@ import dotenv from 'dotenv'; | |||
import type { ClerkSetupOptions, ClerkSetupReturn } from './types'; | |||
|
|||
export const fetchEnvVars = async (options?: ClerkSetupOptions): Promise<ClerkSetupReturn> => { | |||
const { debug = false, dotenv: loadDotEnv = true, ...rest } = options || {}; |
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.
Nit: Why not destruct also publishableKey
and secretKey
here? 🤔
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.
@anagstef No specific reason. Makes sense, I'll update. Thanks!
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.
@anagstef Looking back at the code, it was cleaner to do it this way such that there weren't variable naming conflicts.
Description
Integration Tests:
This PR applies testing tokens to E2E tests via existing pathways.
It also creates
u.po.testingToken.setup()
for tests which live outside existing helper-specific flows.@clerk/testing
I've added two additional options to
setupClerk
to facilitate the functionality above:secretKey
: Allow for explicitly passing the secret keydotenv
: Enable automatic loading of dotenv files. Defaults totrue
Fixes SDKI-982
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change