-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TCP transport - implementation skeleton (cf. uhppoted/uhppote-core#17)
- Loading branch information
Showing
4 changed files
with
183 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const describe = require('mocha').describe | ||
const assert = require('chai').assert | ||
const it = require('mocha').it | ||
const expect = require('chai').expect | ||
const resolve = require('../nodes/common.js').resolve | ||
|
||
describe('common', function () { | ||
describe('resolve controller ID', function () { | ||
it('should resolve a uint32 controller argument', function () { | ||
const { controller, address, protocol } = resolve(405419896) | ||
|
||
expect(controller).to.equal(405419896) | ||
assert.isNull(address) | ||
expect(protocol).to.equal('udp') | ||
}) | ||
|
||
// it('should resolve an object controller ID', function () { | ||
// const { controller, _address, _protocol } = resolve({ controller: 405419896 }) | ||
// | ||
// expect(controller).to.equal(405419896) | ||
// }) | ||
}) | ||
}) |