This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +3
-37
lines changed Expand file tree Collapse file tree 3 files changed +3
-37
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,6 @@ module.exports = (common, options) => {
68
68
expect ( file . size ) . greaterThan ( fixtures . smallFile . data . length )
69
69
} )
70
70
71
- it ( 'should add a Buffer (promised)' , async ( ) => {
72
- const filesAdded = await ipfs . add ( fixtures . smallFile . data )
73
- const file = filesAdded [ 0 ]
74
-
75
- expect ( file . hash ) . to . equal ( fixtures . smallFile . cid )
76
- expect ( file . path ) . to . equal ( fixtures . smallFile . cid )
77
- } )
78
-
79
71
it ( 'should add a BIG Buffer' , async ( ) => {
80
72
const filesAdded = await ipfs . add ( fixtures . bigFile . data )
81
73
expect ( filesAdded ) . to . have . length ( 1 )
@@ -303,7 +295,7 @@ module.exports = (common, options) => {
303
295
expect ( wrapped . path ) . to . equal ( '' )
304
296
} )
305
297
306
- it ( 'should add with only-hash=true (promised) ' , async function ( ) {
298
+ it ( 'should add with only-hash=true' , async function ( ) {
307
299
this . slow ( 10 * 1000 )
308
300
const content = String ( Math . random ( ) + Date . now ( ) )
309
301
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ module.exports = (common, options) => {
29
29
30
30
after ( ( ) => common . teardown ( ) )
31
31
32
- it ( 'should get empty links by multihash (promised) ' , async ( ) => {
32
+ it ( 'should get empty links by multihash' , async ( ) => {
33
33
const testObj = {
34
34
Data : Buffer . from ( hat ( ) ) ,
35
35
Links : [ ]
Original file line number Diff line number Diff line change 4
4
const dagPB = require ( 'ipld-dag-pb' )
5
5
const DAGNode = dagPB . DAGNode
6
6
const { getDescribe, getIt, expect } = require ( '../../utils/mocha' )
7
- const {
8
- calculateCid,
9
- createDAGNode,
10
- addLinkToDAGNode,
11
- asDAGLink
12
- } = require ( '../utils' )
7
+ const { asDAGLink } = require ( '../utils' )
13
8
14
9
/** @typedef { import("ipfsd-ctl").TestsInterface } TestsInterface */
15
10
/**
@@ -77,27 +72,6 @@ module.exports = (common, options) => {
77
72
*/
78
73
} )
79
74
80
- it ( 'should add a link to an existing node (promised)' , async ( ) => {
81
- const obj = {
82
- Data : Buffer . from ( 'patch test object (promised)' ) ,
83
- Links : [ ]
84
- }
85
-
86
- const parentCid = await ipfs . object . put ( obj )
87
- const parent = await ipfs . object . get ( parentCid )
88
- const childCid = await ipfs . object . put ( await createDAGNode ( Buffer . from ( 'some other node' ) , [ ] ) )
89
- const child = await ipfs . object . get ( childCid )
90
- const newParent = await addLinkToDAGNode ( parent , {
91
- name : 'link-to-node' ,
92
- size : child . size ,
93
- cid : childCid
94
- } )
95
- const newParentCid = await calculateCid ( newParent )
96
- const nodeFromObjectPatchCid = await ipfs . object . patch . addLink ( parentCid , newParent . Links [ 0 ] )
97
-
98
- expect ( newParentCid ) . to . eql ( nodeFromObjectPatchCid )
99
- } )
100
-
101
75
it ( 'returns error for request without arguments' , async ( ) => {
102
76
try {
103
77
await ipfs . object . patch . addLink ( null , null , null )
You can’t perform that action at this time.
0 commit comments