|
| 1 | + var assert = require('assert'); |
| 2 | + var PUBNUB = require('../pubnub.js'); |
| 3 | + |
| 4 | + var pubnub = PUBNUB.init({ |
| 5 | + publish_key : 'demo', |
| 6 | + subscribe_key : 'demo' |
| 7 | + }); |
| 8 | + |
| 9 | + var channel = 'javascript-test-channel'; |
| 10 | + var count = 0; |
| 11 | + |
| 12 | + var message_string = 'Hi from Javascript'; |
| 13 | + |
| 14 | + describe('Pubnub', function() { |
| 15 | + this.timeout(40000); |
| 16 | + describe('#publish()', function(){ |
| 17 | + it('should publish json arrays without error 1', function(done){ |
| 18 | + pubnub.publish({channel: channel , message : message_string, |
| 19 | + callback : function(response) { |
| 20 | + done() |
| 21 | + } |
| 22 | + }); |
| 23 | + |
| 24 | + }) |
| 25 | + it('should publish json arrays without error 1', function(done){ |
| 26 | + pubnub.publish({channel: channel , message : message_string, |
| 27 | + callback : function(response) { |
| 28 | + done() |
| 29 | + } |
| 30 | + }); |
| 31 | + |
| 32 | + }) |
| 33 | + it('should publish json arrays without error 1', function(done){ |
| 34 | + pubnub.publish({channel: channel , message : message_string, |
| 35 | + callback : function(response) { |
| 36 | + done() |
| 37 | + } |
| 38 | + }); |
| 39 | + |
| 40 | + }) |
| 41 | + it('should publish json arrays without error 1', function(done){ |
| 42 | + pubnub.publish({channel: channel , message : message_string, |
| 43 | + callback : function(response) { |
| 44 | + done() |
| 45 | + } |
| 46 | + }); |
| 47 | + |
| 48 | + }) |
| 49 | + it('should publish json arrays without error 1', function(done){ |
| 50 | + pubnub.publish({channel: channel , message : message_string, |
| 51 | + callback : function(response) { |
| 52 | + done() |
| 53 | + } |
| 54 | + }); |
| 55 | + |
| 56 | + }) |
| 57 | + it('should publish json arrays without error 1', function(done){ |
| 58 | + pubnub.publish({channel: channel , message : message_string, |
| 59 | + callback : function(response) { |
| 60 | + done() |
| 61 | + } |
| 62 | + }); |
| 63 | + |
| 64 | + }) |
| 65 | + it('should publish json arrays without error 1', function(done){ |
| 66 | + pubnub.publish({channel: channel , message : message_string, |
| 67 | + callback : function(response) { |
| 68 | + done() |
| 69 | + } |
| 70 | + }); |
| 71 | + |
| 72 | + }) |
| 73 | + it('should publish json arrays without error 1', function(done){ |
| 74 | + pubnub.publish({channel: channel , message : message_string, |
| 75 | + callback : function(response) { |
| 76 | + done() |
| 77 | + } |
| 78 | + }); |
| 79 | + |
| 80 | + }) |
| 81 | + }) |
| 82 | + }) |
0 commit comments