Skip to content

Commit

Permalink
fix: ts not happy with bare assert() anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Apr 20, 2022
1 parent 216954d commit 7a61bdf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/test-indexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('CarIndexer fromBytes()', () => {
const indexer = await CarIndexer.fromBytes(goCarV2Bytes)
const roots = await indexer.getRoots()
assert.strictEqual(roots.length, 1)
assert(goCarV2Roots[0].equals(roots[0]))
assert.ok(goCarV2Roots[0].equals(roots[0]))
assert.strictEqual(indexer.version, 2)

const indexData = []
Expand Down
4 changes: 2 additions & 2 deletions test/test-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ describe('CarReader fromBytes()', () => {
const reader = await CarReader.fromBytes(goCarV2Bytes)
const roots = await reader.getRoots()
assert.strictEqual(roots.length, 1)
assert(goCarV2Roots[0].equals(roots[0]))
assert.ok(goCarV2Roots[0].equals(roots[0]))
assert.strictEqual(reader.version, 2)
for (const { cid } of goCarV2Index) {
const block = await reader.get(cid)
assert.isDefined(block)
if (block) {
assert(cid.equals(block.cid))
assert.ok(cid.equals(block.cid))
let content
if (cid.code === dagPb.code) {
content = dagPb.decode(block.bytes)
Expand Down
6 changes: 3 additions & 3 deletions test/test-writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ describe('CarWriter', () => {
const pbBytes = await append(1)
const cborBytes = await append(2)

assert(rawBytes.length > 0)
assert(pbBytes.length > 0)
assert(cborBytes.length > 0)
assert.ok(rawBytes.length > 0)
assert.ok(pbBytes.length > 0)
assert.ok(cborBytes.length > 0)

const reassembled = concatBytes([headerBytes, rawBytes, pbBytes, cborBytes])

Expand Down

0 comments on commit 7a61bdf

Please sign in to comment.