File tree 2 files changed +3
-9
lines changed 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ A great source of [examples][] can be found in the tests for this API.
106
106
##### ` ipfs.pubsub.publish(topic, data, [callback]) `
107
107
108
108
- ` topic: String `
109
- - ` data: Buffer ` - The message to send
109
+ - ` data: Buffer|String ` - The message to send
110
110
- ` callback: (Error) => {} ` - (Optional) Calls back with an error or nothing if the publish was successful.
111
111
112
112
If no ` callback ` is passed, a promise is returned.
Original file line number Diff line number Diff line change @@ -32,15 +32,9 @@ module.exports = (createCommon, options) => {
32
32
33
33
after ( ( done ) => common . teardown ( done ) )
34
34
35
- it ( 'should error on string messags' , async ( ) => {
35
+ it ( 'should publish message from string' , ( ) => {
36
36
const topic = getTopic ( )
37
- try {
38
- await ipfs . pubsub . publish ( topic , 'hello friend' )
39
- } catch ( err ) {
40
- expect ( err ) . to . exist ( )
41
- return
42
- }
43
- throw new Error ( 'did not error on string message' )
37
+ return ipfs . pubsub . publish ( topic , 'hello friend' )
44
38
} )
45
39
46
40
it ( 'should publish message from buffer' , ( ) => {
You can’t perform that action at this time.
0 commit comments