Skip to content

Commit 61bbeb9

Browse files
committed
Add tests
1 parent faf92d1 commit 61bbeb9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/client_tests.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,18 @@ describe.each([
153153
expect(e.type).toEqual('MeiliSearchCommunicationError')
154154
}
155155
})
156+
157+
test(`${permission} key: host without HTTP should not throw Invalid URL Error`, async () => {
158+
const client = new MeiliSearch({ host: 'meilisearch:7700' })
159+
const health = await client.isHealthy()
160+
expect(health).toBe(false)
161+
})
162+
163+
test(`${permission} key: host without HTTP and port should not throw Invalid URL Error`, async () => {
164+
const client = new MeiliSearch({ host: 'meilisearch' })
165+
const health = await client.isHealthy()
166+
expect(health).toBe(false)
167+
})
156168
})
157169

158170
describe.each([

0 commit comments

Comments
 (0)