Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('sharding files', async () => {
const dir = utils.tmpdir()
const fstore = new FsStore(dir)
const shard = new sh.NextToLast(2)
await ShardingStore.create(fstore, shard)
const file = await fsReadFile(path.join(dir, sh.SHARDING_FN))
expect(file.toString()).to.be.eql('/repo/flatfs/shard/v1/next-to-last/2\n')
const readme = await fsReadFile(path.join(dir, sh.README_FN))
expect(readme.toString()).to.be.eql(sh.readme)
await rimraf(dir)
})
setup: () => {
const shard = new sh.NextToLast(2)
return ShardingStore.createOrOpen(new FsStore(dir), shard)
},
teardown: () => {