Skip to content

Commit

Permalink
fix: test blob/add location commitment
Browse files Browse the repository at this point in the history
  • Loading branch information
joaosa committed Jun 4, 2024
1 parent 444dd8c commit a253d37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/upload-client/test/blob.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('Blob.add', () => {

/** @type {import('../src/types.js').ProgressStatus[]} */
const progress = []
const { multihash } = await Blob.add(
const { site, multihash } = await Blob.add(
{ issuer: agent, with: space.did(), proofs, audience: serviceSigner },
bytes,
{
Expand All @@ -90,6 +90,12 @@ describe('Blob.add', () => {
}
)

assert(site)
assert.equal(site.capabilities[0].can, Assert.location.can)
// we're not verifying this as it's a mocked value
// @ts-ignore nb unknown
assert.true(site.capabilities[0].nb.content.multihash.bytes)

assert(service.space.blob.add.called)
assert.equal(service.space.blob.add.callCount, 1)
assert.equal(
Expand Down

0 comments on commit a253d37

Please sign in to comment.