-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(clerk-js): Add snapshots test for OrganizationMembershipRequest
- Loading branch information
1 parent
bce70b1
commit 1b053a3
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
packages/clerk-js/src/core/resources/OrganizationMembershipRequest.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { OrganizationMembershipRequest } from './internal'; | ||
|
||
describe('OrganizationMembership', () => { | ||
it('has the same initial properties', () => { | ||
const organizationMembershipRequest = new OrganizationMembershipRequest({ | ||
object: 'organization_membership_request', | ||
id: 'test_id', | ||
organization_id: 'test_org_id', | ||
status: 'pending', | ||
created_at: 12345, | ||
updated_at: 5678, | ||
public_user_data: { | ||
object: 'public_user_data', | ||
first_name: 'test_first_name', | ||
last_name: 'test_last_name', | ||
profile_image_url: 'test_url', | ||
image_url: 'https://clerk.com', | ||
identifier: 'test@identifier.gr', | ||
id: 'test_user_id', | ||
has_image: true, | ||
}, | ||
}); | ||
|
||
expect(organizationMembershipRequest).toMatchSnapshot(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
...ages/clerk-js/src/core/resources/__snapshots__/OrganizationMembershipRequest.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`OrganizationMembership has the same initial properties 1`] = ` | ||
OrganizationMembershipRequest { | ||
"accept": [Function], | ||
"id": "test_id", | ||
"organizationId": "test_org_id", | ||
"pathRoot": "", | ||
"publicUserData": { | ||
"firstName": "test_first_name", | ||
"hasImage": true, | ||
"identifier": "test@identifier.gr", | ||
"imageUrl": "https://clerk.com", | ||
"lastName": "test_last_name", | ||
"profileImageUrl": "test_url", | ||
"userId": undefined, | ||
}, | ||
"status": "pending", | ||
} | ||
`; |