forked from crossbario/autobahn-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new unit tests and expand testing, fix makefile
- Loading branch information
Tobias Oberstein
committed
Mar 26, 2017
1 parent
9cf943b
commit f10113a
Showing
12 changed files
with
156 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,45 @@ | ||
{ | ||
"name": "autobahn", | ||
"version": "0.11.2", | ||
"description": "An implementation of The Web Application Messaging Protocol (WAMP).", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "nodeunit test/test.js" | ||
}, | ||
"dependencies": { | ||
"crypto-js": ">= 3.1.8", | ||
"tweetnacl": ">= 0.14.3", | ||
"when": ">= 3.7.7", | ||
"ws": ">= 1.1.1", | ||
"msgpack-lite": ">= 0.1.26", | ||
"int64-buffer": ">= 0.1.9" | ||
}, | ||
"optionalDependencies": { | ||
"bufferutil": ">= 1.2.1", | ||
"utf-8-validate": ">= 1.2.1" | ||
}, | ||
"devDependencies": { | ||
"browserify": ">= 13.1.1", | ||
"nodeunit": ">= 0.10.2" | ||
}, | ||
"browser": { | ||
"ws": false, | ||
"lib/transport/rawsocket.js": false | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/crossbario/autobahn-js.git" | ||
}, | ||
"keywords": [ | ||
"WAMP", | ||
"WebSocket", | ||
"RPC", | ||
"PubSub" | ||
], | ||
"author": "Crossbar.io Technologies GmbH", | ||
"license": "MIT" | ||
"name": "autobahn", | ||
"version": "0.12.0", | ||
"description": "An implementation of The Web Application Messaging Protocol (WAMP).", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "nodeunit test/test.js" | ||
}, | ||
"engines": { | ||
"node": ">= 4.2.6" | ||
}, | ||
"dependencies": { | ||
"crypto-js": ">= 3.1.8", | ||
"google-closure-compiler": "^20170218.0.0", | ||
"int64-buffer": ">= 0.1.9", | ||
"msgpack-lite": ">= 0.1.26", | ||
"tweetnacl": ">= 0.14.3", | ||
"when": ">= 3.7.7", | ||
"ws": "< 2.0.0" | ||
}, | ||
"optionalDependencies": { | ||
"bufferutil": ">= 1.2.1", | ||
"utf-8-validate": ">= 1.2.1" | ||
}, | ||
"devDependencies": { | ||
"browserify": ">= 13.1.1", | ||
"nodeunit": ">= 0.10.2" | ||
}, | ||
"browser": { | ||
"ws": false, | ||
"lib/transport/rawsocket.js": false | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/crossbario/autobahn-js.git" | ||
}, | ||
"keywords": [ | ||
"WAMP", | ||
"WebSocket", | ||
"RPC", | ||
"PubSub" | ||
], | ||
"author": "Crossbar.io Technologies GmbH", | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// AutobahnJS - http://autobahn.ws, http://wamp.ws | ||
// | ||
// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). | ||
// | ||
// Copyright (c) Crossbar.io Technologies GmbH and contributors | ||
// | ||
// Licensed under the MIT License. | ||
// http://www.opensource.org/licenses/mit-license.php | ||
// | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
var autobahn = require('./../index.js'); | ||
var testutil = require('./testutil.js'); | ||
|
||
exports.testAsync = function (testcase) { | ||
|
||
testcase.expect(1); | ||
|
||
var test = new testutil.Testlog("test/test_basic_async.txt"); | ||
|
||
var d1 = autobahn.when.defer(); | ||
var d2 = autobahn.when.defer(); | ||
|
||
var df = autobahn.when.all([d1.promise, d2.promise]).then( | ||
function (res) { | ||
test.log(res); | ||
var chk = test.check(); | ||
testcase.ok(!chk, chk); | ||
testcase.done(); | ||
}, | ||
function (err) { | ||
test.log(err); | ||
testcase.done(); | ||
} | ||
); | ||
|
||
d1.resolve(23); | ||
d2.resolve(42); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 [23,42] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// AutobahnJS - http://autobahn.ws, http://wamp.ws | ||
// | ||
// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). | ||
// | ||
// Copyright (c) Crossbar.io Technologies GmbH and contributors | ||
// | ||
// Licensed under the MIT License. | ||
// http://www.opensource.org/licenses/mit-license.php | ||
// | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
var autobahn = require('./../index.js'); | ||
var testutil = require('./testutil.js'); | ||
|
||
exports.testSync = function (testcase) { | ||
|
||
testcase.expect(1); | ||
|
||
var test = new testutil.Testlog("test/test_basic_sync.txt"); | ||
|
||
test.log(true); | ||
var chk = test.check(); | ||
testcase.ok(!chk, chk); | ||
testcase.done(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters