🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

interface-blockstore-tests

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interface-blockstore-tests - npm Package Compare versions

Comparing version

to
7.0.3

88

dist/src/index.js

@@ -65,2 +65,14 @@ /* eslint-env mocha */

});
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair();
const controller = new AbortController();
controller.abort();
await expect((async () => {
return store.put(cid, block, {
signal: controller.signal
});
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort');
});
it('parallel', async () => {

@@ -92,2 +104,14 @@ const data = await getKeyValuePairs(100);

});
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair();
const controller = new AbortController();
controller.abort();
await expect((async () => {
return all(store.putMany([{ cid, block }], {
signal: controller.signal
}));
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort');
});
});

@@ -108,2 +132,14 @@ describe('get', () => {

});
it('supports abort signals', async () => {
const { cid } = await getKeyValuePair();
const controller = new AbortController();
controller.abort();
await expect((async () => {
return store.get(cid, {
signal: controller.signal
});
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort');
});
it('should throw error for missing key', async () => {

@@ -138,2 +174,15 @@ const { cid } = await getKeyValuePair();

});
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair();
await store.put(cid, block);
const controller = new AbortController();
controller.abort();
await expect((async () => {
return all(store.getMany([cid], {
signal: controller.signal
}));
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort');
});
it('should throw error for missing key', async () => {

@@ -176,2 +225,15 @@ const { cid } = await getKeyValuePair();

});
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair();
await store.put(cid, block);
const controller = new AbortController();
controller.abort();
await expect((async () => {
return all(store.getAll({
signal: controller.signal
}));
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort');
});
});

@@ -194,2 +256,15 @@ describe('delete', () => {

});
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair();
await store.put(cid, block);
const controller = new AbortController();
controller.abort();
await expect((async () => {
return store.delete(cid, {
signal: controller.signal
});
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort');
});
it('parallel', async () => {

@@ -227,4 +302,17 @@ const data = await getKeyValuePairs(100);

});
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair();
await store.put(cid, block);
const controller = new AbortController();
controller.abort();
await expect((async () => {
return all(store.deleteMany([cid], {
signal: controller.signal
}));
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort');
});
});
}
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "interface-blockstore-tests",
"version": "7.0.2",
"version": "7.0.3",
"description": "Compliance tests for the blockstore interface",

@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT",

@@ -88,2 +88,17 @@ /* eslint-env mocha */

it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair()
const controller = new AbortController()
controller.abort()
await expect((async () => {
return store.put(cid, block, {
signal: controller.signal
})
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort')
})
it('parallel', async () => {

@@ -125,2 +140,17 @@ const data = await getKeyValuePairs(100)

})
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair()
const controller = new AbortController()
controller.abort()
await expect((async () => {
return all(store.putMany([{ cid, block }], {
signal: controller.signal
}))
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort')
})
})

@@ -150,2 +180,17 @@

it('supports abort signals', async () => {
const { cid } = await getKeyValuePair()
const controller = new AbortController()
controller.abort()
await expect((async () => {
return store.get(cid, {
signal: controller.signal
})
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort')
})
it('should throw error for missing key', async () => {

@@ -192,2 +237,19 @@ const {

it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair()
await store.put(cid, block)
const controller = new AbortController()
controller.abort()
await expect((async () => {
return all(store.getMany([cid], {
signal: controller.signal
}))
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort')
})
it('should throw error for missing key', async () => {

@@ -244,2 +306,19 @@ const {

})
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair()
await store.put(cid, block)
const controller = new AbortController()
controller.abort()
await expect((async () => {
return all(store.getAll({
signal: controller.signal
}))
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort')
})
})

@@ -270,2 +349,19 @@

it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair()
await store.put(cid, block)
const controller = new AbortController()
controller.abort()
await expect((async () => {
return store.delete(cid, {
signal: controller.signal
})
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort')
})
it('parallel', async () => {

@@ -317,3 +413,20 @@ const data = await getKeyValuePairs(100)

})
it('supports abort signals', async () => {
const { cid, block } = await getKeyValuePair()
await store.put(cid, block)
const controller = new AbortController()
controller.abort()
await expect((async () => {
return all(store.deleteMany([cid], {
signal: controller.signal
}))
})()).to.eventually.be.rejected
.with.property('message')
.that.include('abort')
})
})
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet