braid-http 1.3.94 → 1.3.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -385,45 +385,23 @@ var braidify = require('braid-http').http-server
385
385
  nbraidify.enable_multiplex = true // or false
386
386
  ```
387
387
 
388
- ## Test Procedure
388
+ ## Testing
389
389
 
390
- Run tests from the command line:
390
+ Run all tests from the command line:
391
391
 
392
392
  ```
393
- node test/test.js
393
+ npm test
394
394
  ```
395
395
 
396
- Or run tests in a browser by starting the test server:
396
+ Run tests in a browser (auto-opens):
397
397
 
398
398
  ```
399
- node test/test.js --browser
399
+ npm run test:browser
400
400
  ```
401
401
 
402
- Then open https://localhost:9000 and make sure all the boxes turn green.
403
-
404
402
  You can also filter tests by name:
405
403
 
406
404
  ```
407
405
  node test/test.js --filter="version"
408
406
  ```
409
407
 
410
- For the complete browser test (including demos), use 3 terminals. In the first terminal start the demo chat server:
411
-
412
- ```
413
- cd demos/chat
414
- node server.js
415
- ```
416
-
417
- In the second terminal start the demo blog server:
418
- ```
419
- cd demos/blog
420
- node server.js
421
- ```
422
-
423
- And in the third terminal, start the test server:
424
- ```
425
- node test/test.js --browser
426
- ```
427
-
428
- Now open https://localhost:9000, make sure all the boxes turn green, and try out the demo chat and blog, sending a message in each.
429
-
@@ -483,7 +483,7 @@ async function braid_fetch (url, params = {}) {
483
483
 
484
484
  if (subscription_cb && res.ok) start_subscription(subscription_cb, subscription_error)
485
485
 
486
- if (subscription_cb && res.ok && params.onSubscriptionStatus) {
486
+ if (params.subscribe && params.onSubscriptionStatus && res.ok) {
487
487
  subscription_online = true
488
488
  params.onSubscriptionStatus({online: true})
489
489
  }
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.94",
3
+ "version": "1.3.95",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
- "test": "node test/server.js"
6
+ "test": "node test/test.js",
7
+ "test:browser": "node test/test.js --browser"
7
8
  },
8
9
  "author": "Braid Working Group",
9
10
  "repository": "braid-org/braid-http",