This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 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.
106106##### ` ipfs.pubsub.publish(topic, data, [callback]) `
107107
108108- ` topic: String `
109- - ` data: Buffer ` - The message to send
109+ - ` data: Buffer|String ` - The message to send
110110- ` callback: (Error) => {} ` - (Optional) Calls back with an error or nothing if the publish was successful.
111111
112112If 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) => {
3232
3333 after ( ( done ) => common . teardown ( done ) )
3434
35- it ( 'should error on string messags' , async ( ) => {
35+ it ( 'should publish message from string' , ( ) => {
3636 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' )
4438 } )
4539
4640 it ( 'should publish message from buffer' , ( ) => {
You can’t perform that action at this time.
0 commit comments