Skip to content

Commit

Permalink
fix(tests): check links right before delete
Browse files Browse the repository at this point in the history
Signed-off-by: andrew <[email protected]>
  • Loading branch information
andrewxhill committed May 19, 2020
1 parent c19268e commit e354b47
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/buckets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,6 @@ describe('Buckets...', () => {
expect(rep.item?.isdir).to.be.false
})

it('should list bucket links', async () => {
const rootKey = buck.root?.key || ''

const rep = await client.links(rootKey)
expect(rep.url).to.not.equal('')
expect(rep.ipns).to.not.equal('')
})

it('should pull files by path and write to file on node', async function () {
if (isBrowser) return this.skip()
// Bucket path
Expand Down Expand Up @@ -188,6 +180,14 @@ describe('Buckets...', () => {
expect(list.item?.itemsList).to.have.length(1)
})

it('should list bucket links', async () => {
const rootKey = buck.root?.key || ''

const rep = await client.links(rootKey)
expect(rep.url).to.not.equal('')
expect(rep.ipns).to.not.equal('')
})

it('should remove an entire bucket', async () => {
const rootKey = buck.root?.key || ''
const rep = await client.listPath(rootKey, 'dir1/file1.jpg')
Expand Down

0 comments on commit e354b47

Please sign in to comment.