Skip to content

Commit 463e30d

Browse files
committed
fix build errors
1 parent 807f8f8 commit 463e30d

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/v2/components/forms/peopleSearch/PeopleSearch.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { beforeEach, describe, expect, it, jest } from '@jest/globals'
2-
import { namedNode } from 'rdflib'
2+
import { namedNode, type NamedNode } from 'rdflib'
33
import { authSession, authn } from 'solid-logic'
44
import { PeopleSearch } from './PeopleSearch'
5-
import './index'
65
import ns from '../../../../ns'
76

87
jest.mock('@solid-data-modules/contacts-rdflib', () => ({
@@ -32,6 +31,10 @@ const mockCurrentUser = authn.currentUser as jest.Mock
3231
const mockOn = authSession.events.on as jest.Mock
3332
const mockOff = authSession.events.off as jest.Mock
3433

34+
if (!customElements.get('solid-ui-people-search')) {
35+
customElements.define('solid-ui-people-search', PeopleSearch)
36+
}
37+
3538
function getPortalRoot () {
3639
const portalHost = document.querySelector('[data-solid-ui-combobox-portal]') as HTMLDivElement | null
3740
return portalHost?.shadowRoot ?? null
@@ -49,7 +52,7 @@ describe('SolidUIPeopleSearch', () => {
4952
mockCurrentUser.mockReset()
5053
mockOn.mockReset()
5154
mockOff.mockReset()
52-
;(globalThis as typeof globalThis & { fetch?: typeof fetch }).fetch = undefined
55+
Reflect.deleteProperty(globalThis, 'fetch')
5356
})
5457

5558
it('is defined as a custom element', () => {

src/v2/components/forms/peopleSearch/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import { PeopleSearch } from './PeopleSearch'
22

33
export { PeopleSearch }
44
export type {
5-
PeopleSearchPerson,
6-
PeopleSearchRelationshipLabel,
75
PeopleSearchSelectDetail,
86
PeopleSearchSuggestion
97
} from './PeopleSearch'
8+
export type {
9+
PeopleSearchPerson,
10+
PeopleSearchRelationshipLabel
11+
} from './peopleSearchHelpers'
1012
export {
1113
DEFAULT_CATALOG_URL,
1214
discoverPeopleSearchEntries,

0 commit comments

Comments
 (0)