Skip to content

Commit dc27dcc

Browse files
committed
chore: prevent error loading node oauth client when testing
1 parent 1256ba6 commit dc27dcc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

server/plugins/oauth-client.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import type { NodeOAuthClient } from '@atproto/oauth-client-node'
44
* Creates a long living instance of the NodeOAuthClient.
55
*/
66
export default defineNitroPlugin(async nitroApp => {
7+
if (import.meta.test) {
8+
return
9+
}
10+
711
const oauthClient = await getNodeOAuthClient()
812

913
// Attach to event context for access in composables via useRequestEvent()

0 commit comments

Comments
 (0)