Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chm-diederichs committed Oct 30, 2024
1 parent 88a0bb0 commit 5d40b2b
Showing 1 changed file with 5 additions and 27 deletions.
32 changes: 5 additions & 27 deletions test/memory-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ test.skip('memory overlay - delete nodes', async function (t) {
}
})

test('memory overlay - delete tree node range', async function (t) {
// not supported yet
test.skip('memory overlay - delete tree node range', async function (t) {
const c = await getCore(t)

{
Expand Down Expand Up @@ -139,7 +140,8 @@ test('memory overlay - delete tree node range', async function (t) {
}
})

test('memory overlay - delete tree node range: no end', async function (t) {
// not supported yet
test.skip('memory overlay - delete tree node range: no end', async function (t) {
const c = await getCore(t)

{
Expand Down Expand Up @@ -218,7 +220,7 @@ test('memory overlay - peek last tree node', async function (t) {
hash: HASH,
size: 10
})
await t.exception(() => b.flush())
await b.flush()
}

{
Expand All @@ -235,30 +237,6 @@ test('memory overlay - peek last tree node', async function (t) {
}
})

test('memory overlay - invalid tree node add', async function (t) {
const c = await getCore(t)

{
const b = c.createWriteBatch()
b.putTreeNode({ index: 10000000, hash: HASH, size: 10 })
await b.flush()
}

{
const b = c.createWriteBatch()
b.putTreeNode({ index: 1, hash: HASH, size: 10 })
await t.exception(() => b.flush())
}

{
const b = c.createWriteBatch()
b.putTreeNode({ index: 10000001, hash: HASH, size: 11 })
b.putTreeNode({ index: 10000002, hash: HASH, size: 12 })
b.putTreeNode({ index: 10000003, hash: HASH, size: 13 })
await t.execution(() => b.flush())
}
})

test('memory overlay - peek last tree node', async function (t) {
const c = await getCore(t)

Expand Down

0 comments on commit 5d40b2b

Please sign in to comment.