Skip to content

Commit 5abbf4c

Browse files
committed
Add test on fetch info
1 parent fe446a6 commit 5abbf4c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/index.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,19 +327,18 @@ describe.each([{ permission: 'Master' }, { permission: 'Private' }])(
327327
expect(response).toHaveProperty('fieldDistribution', {})
328328
})
329329

330-
test(`${permission} key: Get updatedAt and createdAt of created index`, async () => {
330+
test(`${permission} key: Get updatedAt and createdAt through fetch info`, async () => {
331331
const client = await getClient(permission)
332332
const { uid } = await client.createIndex(indexPk.uid)
333333
await client.waitForTask(uid)
334334

335-
const index = client.index(indexPk.uid)
336-
await index.getRawInfo()
335+
const index = await client.index(indexPk.uid).fetchInfo()
337336

338337
expect(index.createdAt).toBeInstanceOf(Date)
339338
expect(index.updatedAt).toBeInstanceOf(Date)
340339
})
341340

342-
test(`${permission} key: Get updatedAt and createdAt index witch fetched information`, async () => {
341+
test(`${permission} key: Get updatedAt and createdAt index through getRawInfo`, async () => {
343342
const client = await getClient(permission)
344343
const { uid } = await client.createIndex(indexPk.uid)
345344
await client.waitForTask(uid)

0 commit comments

Comments
 (0)