Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bidoubiwa committed Jun 7, 2022
1 parent 716675b commit 868ea2a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,24 +331,22 @@ describe.each([{ permission: 'Master' }, { permission: 'Private' }])(

test(`${permission} key: Get updatedAt and createdAt of created index`, async () => {
const client = await getClient(permission)
const { uid } = await client.createIndex(indexNoPk.uid)
const { uid } = await client.createIndex(indexPk.uid)
await client.waitForTask(uid)

const response = await client.index(indexPk.uid).getRawInfo()

expect(response).toBeInstanceOf(Date)
expect(response).toBeInstanceOf(Date)
expect(response).toBeDefined()
expect(response).toBeDefined()
})

test(`${permission} key: Get updatedAt and createdAt from initialized index`, async () => {
const client = await getClient(permission)
const { uid } = await client.createIndex(indexNoPk.uid)
await client.waitForTask(uid)

const response = await client.index(indexPk.uid).getRawInfo()
const response = await client.index(indexPk.uid)

expect(response).toBeUndefined()
expect(response).toBeUndefined()
expect(response.createdAt).toBeUndefined()
expect(response.updatedAt).toBeUndefined()
})
}
)
Expand Down

0 comments on commit 868ea2a

Please sign in to comment.