add/update lastSeen to a peer once a stream is open

This commit is contained in:
David Dias 2015-07-30 14:58:32 -07:00
parent 648eb7c666
commit 02e07993da

View File

@ -72,6 +72,18 @@ experiment('BASE', function () {
})
})
})
test('Check for lastSeen', function (done) {
var protocol = '/sparkles/3.3.3'
swarmB.registerHandler(protocol, function (stream) {})
swarmA.openStream(peerB, protocol, function (err, stream) {
expect(err).to.not.be.instanceof(Error)
expect(peerB.lastSeen).to.be.instanceof(Date)
done()
})
})
})
experiment('IDENTIFY', function () {