fix image unit tests

This commit is contained in:
Moriz Wahl 2023-02-13 15:59:45 +01:00
parent 46e93b0f9c
commit 9336c76c46

View File

@ -79,7 +79,7 @@ describe('deleteImage', () => {
await expect(someString).toEqual('Hello') await expect(someString).toEqual('Hello')
}) })
it('rolls back the transaction in case of errors', async (done) => { it('rolls back the transaction in case of errors', async () => {
await expect(neode.all('Image')).resolves.toHaveLength(1) await expect(neode.all('Image')).resolves.toHaveLength(1)
const session = driver.session() const session = driver.session()
try { try {
@ -94,7 +94,6 @@ describe('deleteImage', () => {
// nothing has been deleted // nothing has been deleted
await expect(neode.all('Image')).resolves.toHaveLength(1) await expect(neode.all('Image')).resolves.toHaveLength(1)
// all good // all good
done()
} finally { } finally {
session.close() session.close()
} }
@ -240,7 +239,7 @@ describe('mergeImage', () => {
}) })
}) })
it('rolls back the transaction in case of errors', async (done) => { it('rolls back the transaction in case of errors', async () => {
const session = driver.session() const session = driver.session()
try { try {
await session.writeTransaction(async (transaction) => { await session.writeTransaction(async (transaction) => {
@ -255,7 +254,6 @@ describe('mergeImage', () => {
// nothing has been created // nothing has been created
await expect(neode.all('Image')).resolves.toHaveLength(0) await expect(neode.all('Image')).resolves.toHaveLength(0)
// all good // all good
done()
} finally { } finally {
session.close() session.close()
} }