Skip to content

Commit e32b21e

Browse files
authored
chore(tanstack-react-start): Add export snapshots (#5692)
1 parent 1160511 commit e32b21e

6 files changed

Lines changed: 116 additions & 1 deletion

File tree

.changeset/smart-rooms-refuse.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/tanstack-react-start/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262
"lint": "eslint src",
6363
"lint:attw": "attw --pack . --profile esm-only",
6464
"lint:publint": "publint",
65-
"publish:local": "pnpm yalc push --replace --sig"
65+
"publish:local": "pnpm yalc push --replace --sig",
66+
"test": "vitest run",
67+
"test:watch": "vitest watch"
6668
},
6769
"dependencies": {
6870
"@clerk/backend": "workspace:^",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2+
3+
exports[`errors public exports > should not change unexpectedly 1`] = `
4+
[
5+
"EmailLinkErrorCode",
6+
"EmailLinkErrorCodeStatus",
7+
"isClerkAPIResponseError",
8+
"isEmailLinkError",
9+
"isKnownError",
10+
"isMetamaskError",
11+
"isReverificationCancelledError",
12+
]
13+
`;
14+
15+
exports[`root public exports > should not change unexpectedly 1`] = `
16+
[
17+
"AuthenticateWithRedirectCallback",
18+
"ClerkDegraded",
19+
"ClerkFailed",
20+
"ClerkLoaded",
21+
"ClerkLoading",
22+
"ClerkProvider",
23+
"CreateOrganization",
24+
"GoogleOneTap",
25+
"OrganizationList",
26+
"OrganizationProfile",
27+
"OrganizationSwitcher",
28+
"Protect",
29+
"RedirectToCreateOrganization",
30+
"RedirectToOrganizationProfile",
31+
"RedirectToSignIn",
32+
"RedirectToSignUp",
33+
"RedirectToUserProfile",
34+
"SignIn",
35+
"SignInButton",
36+
"SignInWithMetamaskButton",
37+
"SignOutButton",
38+
"SignUp",
39+
"SignUpButton",
40+
"SignedIn",
41+
"SignedOut",
42+
"UserButton",
43+
"UserProfile",
44+
"Waitlist",
45+
"useAuth",
46+
"useClerk",
47+
"useEmailLink",
48+
"useOrganization",
49+
"useOrganizationList",
50+
"useReverification",
51+
"useSession",
52+
"useSessionList",
53+
"useSignIn",
54+
"useSignUp",
55+
"useUser",
56+
]
57+
`;
58+
59+
exports[`server public exports > should not change unexpectedly 1`] = `
60+
[
61+
"clerkClient",
62+
"createClerkHandler",
63+
"getAuth",
64+
]
65+
`;
66+
67+
exports[`webhooks public exports > should not change unexpectedly 1`] = `
68+
[
69+
"verifyWebhook",
70+
]
71+
`;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import * as errorsExports from '../errors';
2+
import * as publicExports from '../index';
3+
import * as serverExports from '../server/index';
4+
import * as webhooksExports from '../webhooks';
5+
6+
describe('root public exports', () => {
7+
it('should not change unexpectedly', () => {
8+
expect(Object.keys(publicExports).sort()).toMatchSnapshot();
9+
});
10+
});
11+
12+
describe('server public exports', () => {
13+
it('should not change unexpectedly', () => {
14+
expect(Object.keys(serverExports).sort()).toMatchSnapshot();
15+
});
16+
});
17+
18+
describe('errors public exports', () => {
19+
it('should not change unexpectedly', () => {
20+
expect(Object.keys(errorsExports).sort()).toMatchSnapshot();
21+
});
22+
});
23+
24+
describe('webhooks public exports', () => {
25+
it('should not change unexpectedly', () => {
26+
expect(Object.keys(webhooksExports).sort()).toMatchSnapshot();
27+
});
28+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig } from 'vitest/config';
2+
3+
export default defineConfig({
4+
test: {
5+
globals: true,
6+
environment: 'jsdom',
7+
setupFiles: './vitest.setup.mts',
8+
},
9+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
globalThis.__DEV__ = true;
2+
globalThis.PACKAGE_NAME = '@clerk/tanstack-react-start';
3+
globalThis.PACKAGE_VERSION = '0.0.0-test';

0 commit comments

Comments
 (0)