mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix image unit tests
This commit is contained in:
parent
46e93b0f9c
commit
9336c76c46
@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user