Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('interop with go', async () => {
const repodir = path.join(__dirname, '/test-repo/blocks')
const fstore = new FsStore(repodir)
const key = new Key('CIQGFTQ7FSI2COUXWWLOQ45VUM2GUZCGAXLWCTOKKPGTUWPXHBNIVOY')
const expected = fs.readFileSync(path.join(repodir, 'VO', key.toString() + '.data'))
const flatfs = await ShardingStore.open(fstore)
let res = await flatfs.get(key)
let queryResult = flatfs.query({})
let results = []
for await (const result of queryResult) results.push(result)
expect(results).to.have.length(23)
expect(res).to.be.eql(expected)
})