@@ -205,56 +205,34 @@ describe('files', () => runOnAndOff((thing) => {
205
205
} )
206
206
} )
207
207
208
- // Temporarily expect to fail as raw-leaves not yet implemented.
209
- //
210
- // When cid-version=1 then raw-leaves MUST be present and false.
211
- //
212
- // This is because raw-leaves is not yet implemented in js-ipfs,
213
- // and go-ipfs changes the value of raw-leaves to true when
214
- // cid-version > 0 unless explicitly set to false.
215
- //
216
- // This retains feature parity without having to implement raw-leaves.
217
208
it ( 'add with cid-version=1' , function ( ) {
218
209
this . timeout ( 30 * 1000 )
219
210
220
- return new Promise ( ( resolve , reject ) => {
221
- ipfs ( 'add src/init-files/init-docs/readme --cid-version=1' )
222
- . then ( ( ) => reject ( new Error ( 'Raw leaves not expected to be implemented' ) ) )
223
- . catch ( ( err ) => {
224
- expect ( err ) . to . exist ( )
225
- resolve ( )
226
- } )
227
- } )
211
+ return ipfs ( 'add src/init-files/init-docs/readme --cid-version=1' )
212
+ . then ( ( out ) => {
213
+ expect ( out )
214
+ . to . eql ( 'added zdj7WWeQ43G6JJvLWQWZpyHuAMq6uYWRjkBXFad11vE2LHhQ7 readme\n' )
215
+ } )
228
216
} )
229
217
230
- // TODO: this test is failing, @alanshaw?
231
- it . skip ( 'add with cid-version=1 and raw-leaves=false' , ( ) => {
232
- return ipfs ( 'add src/init-files/init-docs/readme --cid-version=1 --raw-leaves=false' ) . then ( ( out ) => {
233
- expect ( out )
234
- . to . eql ( 'added zdj7WWeQ43G6JJvLWQWZpyHuAMq6uYWRjkBXFad11vE2LHhQ7 readme\n' )
235
- } )
218
+ it ( 'add with cid-version=1 and raw-leaves=false' , function ( ) {
219
+ this . timeout ( 30 * 1000 )
220
+
221
+ return ipfs ( 'add src/init-files/init-docs/readme --cid-version=1 --raw-leaves=false' )
222
+ . then ( ( out ) => {
223
+ expect ( out )
224
+ . to . eql ( 'added zdj7WWeQ43G6JJvLWQWZpyHuAMq6uYWRjkBXFad11vE2LHhQ7 readme\n' )
225
+ } )
236
226
} )
237
227
238
- // Temporarily expect to fail as raw-leaves not yet implemented
239
- //
240
- // When cid-version=1 then raw-leaves MUST be present and false.
241
- //
242
- // This is because raw-leaves is not yet implemented in js-ipfs,
243
- // and go-ipfs changes the value of raw-leaves to true when
244
- // cid-version > 0 unless explicitly set to false.
245
- //
246
- // This retains feature parity without having to implement raw-leaves.
247
228
it ( 'add with cid-version=1 and raw-leaves=true' , function ( ) {
248
229
this . timeout ( 30 * 1000 )
249
230
250
- return new Promise ( ( resolve , reject ) => {
251
- ipfs ( 'add src/init-files/init-docs/readme --cid-version=1 --raw-leaves=true' )
252
- . then ( ( ) => reject ( new Error ( 'Raw leaves not expected to be implemented' ) ) )
253
- . catch ( ( err ) => {
254
- expect ( err ) . to . exist ( )
255
- resolve ( )
256
- } )
257
- } )
231
+ return ipfs ( 'add src/init-files/init-docs/readme --cid-version=1 --raw-leaves=true' )
232
+ . then ( ( out ) => {
233
+ expect ( out )
234
+ . to . eql ( 'added zdj7WiLc855B1KPRgV7Fh8ivjuAhePE1tuJafmxH5HmmSjqaD readme\n' )
235
+ } )
258
236
} )
259
237
260
238
it ( 'add --quiet' , function ( ) {
0 commit comments