We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7799149 commit 47de8f5Copy full SHA for 47de8f5
put.js
@@ -20,6 +20,7 @@ const PutOpts = figgyPudding({
20
gid: {},
21
single: {},
22
sep: {},
23
+ error: {},
24
strict: {}
25
})
26
test/put.js
@@ -102,6 +102,16 @@ test('optionally memoizes data on stream insertion', t => {
102
103
104
105
+test('errors if integrity errors', t => {
106
+ return BB.join(
107
+ put(CACHE, KEY, CONTENT, {
108
+ integrity: 'sha1-BaDDigEST'
109
+ }).catch(err => {
110
+ t.equal(err.code, 'EINTEGRITY', 'got error from bad integrity')
111
+ })
112
+ )
113
+})
114
+
115
test('signals error if error writing to cache', t => {
116
return BB.join(
117
put(CACHE, KEY, CONTENT, {
0 commit comments