Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove spurious uses of t.end() #595

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions tests/bitfield-rle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ test('encodes and decodes', function (t) {
t.ok(deflated.length < bits.buffer.length, 'is smaller')
var inflated = rle.decode(deflated)
t.alike(inflated, toUint32Array(bits.buffer), 'decodes to same buffer')
t.end()
})

test('encodingLength', function (t) {
Expand All @@ -21,7 +20,6 @@ test('encodingLength', function (t) {
deflated.length,
'encoding length is similar to encoded buffers length'
)
t.end()
})

test('encodes and decodes with all bits set', function (t) {
Expand All @@ -33,7 +31,6 @@ test('encodes and decodes with all bits set', function (t) {
t.ok(deflated.length < bits.buffer.length, 'is smaller')
var inflated = rle.decode(deflated)
t.alike(inflated, toUint32Array(bits.buffer), 'decodes to same buffer')
t.end()
})

test('encodes and decodes with some bits set', function (t) {
Expand All @@ -51,7 +48,6 @@ test('encodes and decodes with some bits set', function (t) {
t.ok(deflated.length < bits.buffer.length, 'is smaller')
var inflated = rle.decode(deflated)
t.alike(inflated, toUint32Array(bits.buffer), 'decodes to same buffer')
t.end()
})

test('encodes and decodes with random bits set', function (t) {
Expand All @@ -65,7 +61,6 @@ test('encodes and decodes with random bits set', function (t) {
t.ok(deflated.length < bits.buffer.length, 'is smaller')
var inflated = rle.decode(deflated)
t.alike(inflated, toUint32Array(bits.buffer), 'decodes to same buffer')
t.end()
})

test('encodes and decodes with random bits set (not power of two)', function (t) {
Expand All @@ -79,14 +74,12 @@ test('encodes and decodes with random bits set (not power of two)', function (t)
t.ok(deflated.length < bits.buffer.length, 'is smaller')
var inflated = rle.decode(deflated)
t.alike(inflated, toUint32Array(bits.buffer), 'decodes to same buffer')
t.end()
})

test('encodes empty bitfield', function (t) {
var deflated = rle.encode(new Uint32Array())
var inflated = rle.decode(deflated)
t.alike(inflated, new Uint32Array(), 'still empty')
t.end()
})

test('throws on bad input', function (t) {
Expand All @@ -102,7 +95,6 @@ test('throws on bad input', function (t) {
])
)
}, 'missing delta')
t.end()
})

test('not power of two', function (t) {
Expand All @@ -113,7 +105,6 @@ test('not power of two', function (t) {
toUint32Array([255, 255, 255, 240]),
'output equal to input'
)
t.end()
})

/** @param {Bitfield | Buffer | Array<number>} b */
Expand Down
Loading