Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

Commit 9ef6028

Browse files
dignifiedquiredaviddias
authored andcommitted
Use dignified.js 1.0.0
1 parent 1cbaaea commit 9ef6028

File tree

2 files changed

+1
-58
lines changed

2 files changed

+1
-58
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"bs58": "^3.0.0",
3535
"buffer-loader": "0.0.1",
3636
"chai": "^3.4.1",
37-
"dignified.js": "github:dignifiedquire/dignified.js",
37+
"dignified.js": "^1.0.0",
3838
"fs-blob-store": "^5.2.1",
3939
"highland": "^2.7.1",
4040
"idb-plus-blob-store": "^1.0.0",

test/buffer-test.js

-57
Original file line numberDiff line numberDiff line change
@@ -16,63 +16,6 @@ const bigLink = require('buffer!./test-data/1.2MiB.txt.link-block0')
1616
const marbuf = require('buffer!./test-data/200Bytes.txt.block')
1717

1818
module.exports = function (repo) {
19-
describe('chunker: fixed size', function () {
20-
this.timeout(10000)
21-
22-
it('256 Bytes chunks', function (done) {
23-
let counter = 0
24-
fileStream()
25-
.pipe(FixedSizeChunker(256))
26-
.pipe(through(function (chunk, enc, cb) {
27-
if (chunk.length < 256) {
28-
expect(counter).to.be.below(1)
29-
counter += 1
30-
return cb()
31-
}
32-
expect(chunk.length).to.equal(256)
33-
cb()
34-
}, () => {
35-
done()
36-
}))
37-
})
38-
39-
it('256 KiB chunks', function (done) {
40-
let counter = 0
41-
const KiB256 = 262144
42-
fileStream()
43-
.pipe(FixedSizeChunker(KiB256))
44-
.pipe(through((chunk, enc, cb) => {
45-
if (chunk.length < 262144) {
46-
expect(counter).to.be.below(1)
47-
counter += 1
48-
return cb()
49-
}
50-
expect(chunk.length).to.equal(262144)
51-
cb()
52-
}, () => {
53-
done()
54-
}))
55-
})
56-
57-
it('256 KiB chunks of non scalar filesize', function (done) {
58-
let counter = 0
59-
const KiB256 = 262144
60-
fileStream()
61-
.pipe(FixedSizeChunker(KiB256))
62-
.pipe(through((chunk, enc, cb) => {
63-
if (chunk.length < KiB256) {
64-
expect(counter).to.be.below(2)
65-
counter += 1
66-
return cb()
67-
}
68-
expect(chunk.length).to.equal(KiB256)
69-
cb()
70-
}, () => {
71-
done()
72-
}))
73-
})
74-
})
75-
7619
describe('layout: importer', function () {
7720
it('import a small buffer', function (done) {
7821
// this is just like "import a small file"

0 commit comments

Comments
 (0)