This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 2 files changed +8
-1
lines changed 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ exports = module.exports = function HttpApi (repo) {
19
19
20
20
this . start = ( callback ) => {
21
21
if ( typeof repo === 'string' ) {
22
- console . log ( 'here' )
23
22
repo = new IPFSRepo ( repo , { stores : fsbs } )
24
23
}
25
24
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ module.exports = (httpAPI) => {
56
56
payload : payload
57
57
} , ( res ) => {
58
58
expect ( res . statusCode ) . to . equal ( 200 )
59
+ var result = JSON . parse ( res . result )
60
+ expect ( result . Name ) . to . equal ( 'node.json' )
61
+ expect ( result . Hash ) . to . equal ( 'QmRRdjTN2PjyEPrW73GBxJNAZrstH5tCZzwHYFJpSTKkhe' )
59
62
done ( )
60
63
} )
61
64
} )
@@ -77,6 +80,11 @@ module.exports = (httpAPI) => {
77
80
payload : payload
78
81
} , ( res ) => {
79
82
expect ( res . statusCode ) . to . equal ( 200 )
83
+ var results = res . result . split ( '\n' ) . slice ( 0 , - 1 ) . map ( JSON . parse )
84
+ expect ( results [ 0 ] . Name ) . to . equal ( 'hello' )
85
+ expect ( results [ 0 ] . Hash ) . to . equal ( 'QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o' )
86
+ expect ( results [ 1 ] . Name ) . to . equal ( 'otherconfig' )
87
+ expect ( results [ 1 ] . Hash ) . to . equal ( 'QmayedZNznnEbHtyfjeQvvt29opSLjYjLtLqwfwSWq28ds' )
80
88
done ( )
81
89
} )
82
90
} )
You can’t perform that action at this time.
0 commit comments