Files: c0e9a969c5c0484a867b4ca5508beaeff462f603 / test / real.js
804 bytesRaw
1 | |
2 | var rimraf = require('rimraf') |
3 | var osenv = require('osenv') |
4 | var path = require('path') |
5 | var ref = require('ssb-ref') |
6 | var mkdirp = require('mkdirp') |
7 | var level = require('level') |
8 | |
9 | var Blobs = require('../inject') |
10 | var create = require('../create') |
11 | |
12 | function 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. |
28 | var sync = require('./util').sync |
29 | require('./simple')(test_create, sync) |
30 | require('./integration')(test_create, sync) |
31 | require('./legacy')(test_create, sync) |
32 | require('./push')(test_create, sync) |
33 | |
34 | |
35 | |
36 | |
37 |
Built with git-ssb-web