Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong committed Jul 18, 2024
1 parent 4984360 commit 81e300e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe(fileShortPath(import.meta.url), () => {
})

describe('Should auto default(rollback) work', () => {
it('throw from .then()', async () => {
it('commit even throw in .then()', async () => {
const trx = await km.transaction()
assert(trx)
const msg = 'debug test error'
Expand All @@ -45,7 +45,7 @@ describe(fileShortPath(import.meta.url), () => {
catch (ex) {
assert(ex instanceof Error)
assert(ex.message === msg)
assert(! trx.isCompleted())
assert(trx.isCompleted())

const currCtime2 = await read(km)
assert(currCtime2)
Expand Down
4 changes: 2 additions & 2 deletions packages/kmore/test/transaction/157.auto-commit.throw.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe(fileShortPath(import.meta.url), () => {
})

describe('Should auto commit work on error', () => {
it('ignore rejection from .then()', async () => {
it('commit even reject in .then()', async () => {
const trx = await km.transaction({ trxActionOnEnd: 'commit' })
assert(trx)
const msg = 'debug test error'
Expand All @@ -47,7 +47,7 @@ describe(fileShortPath(import.meta.url), () => {
catch (ex) {
assert(ex instanceof Error)
assert(ex.message === msg)
assert(! trx.isCompleted())
assert(trx.isCompleted())

const currCtime2 = await read(km)
assert(currCtime2)
Expand Down

0 comments on commit 81e300e

Please # to comment.