git ssb

3+

Dominic / ssb-blobs



Tree: c0e9a969c5c0484a867b4ca5508beaeff462f603

Files: c0e9a969c5c0484a867b4ca5508beaeff462f603 / test / real.js

804 bytesRaw
1
2var rimraf = require('rimraf')
3var osenv = require('osenv')
4var path = require('path')
5var ref = require('ssb-ref')
6var mkdirp = require('mkdirp')
7var level = require('level')
8
9var Blobs = require('../inject')
10var create = require('../create')
11
12function test_create(name, async) {
13 var dir = path.join(
14 osenv.tmpdir(),
15 'test-blobstore_'+Date.now()+'_'+name
16 )
17 rimraf.sync(dir)
18 mkdirp.sync(dir)
19 return Blobs(
20 create(dir),
21 require('../set')(level(dir, {valueEncoding: 'json'})),
22 name
23 )
24}
25
26//since we are using the real FS this time,
27//we don't need to apply fake async.
28var sync = require('./util').sync
29require('./simple')(test_create, sync)
30require('./integration')(test_create, sync)
31require('./legacy')(test_create, sync)
32require('./push')(test_create, sync)
33
34
35
36
37

Built with git-ssb-web