diff --git a/packages/clerk-js/src/core/resources/OrganizationDomain.test.ts b/packages/clerk-js/src/core/resources/OrganizationDomain.test.ts new file mode 100644 index 0000000000..0aad2e5d17 --- /dev/null +++ b/packages/clerk-js/src/core/resources/OrganizationDomain.test.ts @@ -0,0 +1,40 @@ +import { OrganizationDomain } from './internal'; + +describe('OrganizationDomain', () => { + it('has the same initial properties', () => { + const organization = new OrganizationDomain({ + object: 'organization_domain', + id: 'test_domain_id', + name: 'clerk.dev', + organization_id: 'test_org_id', + enrollment_mode: 'manual_invitation', + verification: { + attempts: 1, + expires_at: 12345, + strategy: 'email_code', + status: 'verified', + }, + affiliation_email_address: 'some@clerk.dev', + created_at: 12345, + updated_at: 5678, + }); + + expect(organization).toMatchSnapshot(); + }); + + it('has the same initial nullable properties', () => { + const organization = new OrganizationDomain({ + object: 'organization_domain', + id: 'test_domain_id', + name: 'clerk.dev', + organization_id: 'test_org_id', + enrollment_mode: 'manual_invitation', + verification: null, + affiliation_email_address: null, + created_at: 12345, + updated_at: 5678, + }); + + expect(organization).toMatchSnapshot(); + }); +}); diff --git a/packages/clerk-js/src/core/resources/__snapshots__/OrganizationDomain.test.ts.snap b/packages/clerk-js/src/core/resources/__snapshots__/OrganizationDomain.test.ts.snap new file mode 100644 index 0000000000..a8083943b8 --- /dev/null +++ b/packages/clerk-js/src/core/resources/__snapshots__/OrganizationDomain.test.ts.snap @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`OrganizationDomain has the same initial nullable properties 1`] = ` +OrganizationDomain { + "affiliationEmailAddress": null, + "attemptAffiliationVerification": [Function], + "delete": [Function], + "enrollmentMode": "manual_invitation", + "id": "test_domain_id", + "name": "clerk.dev", + "organizationId": "test_org_id", + "pathRoot": "", + "prepareDomainAffiliationVerification": [Function], + "update": [Function], + "verification": null, +} +`; + +exports[`OrganizationDomain has the same initial properties 1`] = ` +OrganizationDomain { + "affiliationEmailAddress": "some@clerk.dev", + "attemptAffiliationVerification": [Function], + "delete": [Function], + "enrollmentMode": "manual_invitation", + "id": "test_domain_id", + "name": "clerk.dev", + "organizationId": "test_org_id", + "pathRoot": "", + "prepareDomainAffiliationVerification": [Function], + "update": [Function], + "verification": { + "attempts": 1, + "expiresAt": 1970-01-01T00:00:12.345Z, + "status": "verified", + "strategy": "email_code", + }, +} +`;