Format files

This commit is contained in:
Daniel Guerra committed 2026-08-07 09:22:08 -06:00
1 parent 4cba211a90
commit fedd72a227
3 files changed
+8 -9

No files matched your search

@@ -1,7 +1,11 @@
import { Organization } from "@/types"
import { useMemo } from "react"
import { useMemo } from 'react'
export function useFindDuplicatedOrganizationByName(name: string, organizations: Organization[] | undefined) {
import { Organization } from '@/types'
export function useFindDuplicatedOrganizationByName(
name: string,
organizations: Organization[] | undefined
) {
return useMemo(
() => findDuplicateOrganizationByName(organizations, name ?? ''),
[organizations, name]
@@ -72,7 +72,6 @@ describe('NewOrgForm', () => {
)
).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Create organization' })).toBeEnabled()
})
@@ -3,11 +3,7 @@ import { describe, expect, test } from 'vitest'
import { findDuplicateOrganizationByName } from '@/components/interfaces/Organization/NewOrg/NewOrgForm.utils'
describe('findDuplicateOrganizationByName', () => {
const organizations = [
{ name: 'Acme Inc.' },
{ name: 'Personal' },
{ name: 'my org' },
]
const organizations = [{ name: 'Acme Inc.' }, { name: 'Personal' }, { name: 'my org' }]
test('finds an exact name match', () => {
expect(findDuplicateOrganizationByName(organizations, 'Acme Inc.')).toBe(organizations[0])