Skip to content

Commit e2cf5f7

Browse files
committed
Test: deleting non-existent path
Coverage flagged this; good call.
1 parent 437f09a commit e2cf5f7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ test('set and delete empty path', (t) => {
119119
t.end()
120120
})
121121

122+
test('attempting to delete non-existent path', (t) => {
123+
const p = new AKM()
124+
125+
t.same(p.delete([]), false)
126+
t.same(p.size, 0)
127+
t.end()
128+
})
129+
122130
test('delete longer paths', (t) => {
123131
const p = new AKM()
124132

0 commit comments

Comments
 (0)