mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 23:11:29 -04:00
more jasmine specs for proxypair, ui, and snowflake coffee files
This commit is contained in:
parent
e0081ea954
commit
547cb9690a
9 changed files with 159 additions and 56 deletions
|
@ -1,27 +1,13 @@
|
|||
###
|
||||
jasmine tests for Snowflake
|
||||
jasmine tests for Snowflake proxypair
|
||||
###
|
||||
|
||||
# Stubs to fake browser functionality.
|
||||
class PeerConnection
|
||||
class WebSocket
|
||||
OPEN: 1
|
||||
CLOSED: 0
|
||||
ui =
|
||||
log: ->
|
||||
setActive: ->
|
||||
log = ->
|
||||
|
||||
describe 'ProxyPair', ->
|
||||
fakeRelay = Parse.address '0.0.0.0:12345'
|
||||
rateLimit = new DummyRateLimit()
|
||||
destination = []
|
||||
fakeClient = send: (d) -> destination.push d
|
||||
# Fake snowflake to interact with
|
||||
snowflake = {
|
||||
broker:
|
||||
sendAnswer: ->
|
||||
}
|
||||
pp = new ProxyPair(fakeClient, fakeRelay, rateLimit)
|
||||
|
||||
it 'begins webrtc connection', ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue