mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 23:11:29 -04:00
Initialize arrays when constructing
Otherwise, this is set on the prototype and shared across instances :/ Note the change to the test that highlights this bug. A proxy pair was already created when an earlier test called `beginWebRTC()` but a new Snowflake instance should start with an empty array.
This commit is contained in:
parent
9df66b15b1
commit
3839c2e0b1
3 changed files with 4 additions and 5 deletions
|
@ -68,7 +68,7 @@ describe 'Snowflake', ->
|
|||
it 'can make a proxypair', ->
|
||||
s = new Snowflake(new FakeBroker(), fakeUI)
|
||||
s.makeProxyPair()
|
||||
expect(s.proxyPairs.length).toBe 2
|
||||
expect(s.proxyPairs.length).toBe 1
|
||||
|
||||
it 'gives a dialog when closing, only while active', ->
|
||||
silenceNotifications = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue