mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
use coffeelint
This commit is contained in:
parent
7e5e9f9f5f
commit
bc1e147ca2
7 changed files with 179 additions and 25 deletions
|
@ -1,19 +1,17 @@
|
|||
window = {}
|
||||
|
||||
VERBOSE = false
|
||||
if process.argv.indexOf('-v') >= 0
|
||||
VERBOSE = true
|
||||
VERBOSE = true if process.argv.indexOf('-v') >= 0
|
||||
|
||||
numTests = 0
|
||||
numFailed = 0
|
||||
|
||||
announce = (testName) ->
|
||||
if VERBOSE
|
||||
console.log '\n --- ' + testName + ' ---'
|
||||
console.log '\n --- ' + testName + ' ---' if VERBOSE
|
||||
|
||||
pass = (test) ->
|
||||
numTests++;
|
||||
if VERBOSE
|
||||
console.log 'PASS ' + test
|
||||
numTests++
|
||||
console.log 'PASS ' + test if VERBOSE
|
||||
|
||||
fail = (test, expected, actual) ->
|
||||
numTests++
|
||||
|
@ -88,10 +86,10 @@ http://www.ietf.org/rfc/rfc2965.txt for the grammar.
|
|||
testParseCookieString = ->
|
||||
TESTS = [{
|
||||
cs: ''
|
||||
expected: { }
|
||||
expected: {}
|
||||
},{
|
||||
cs: 'a=b'
|
||||
expected: { a: 'b'}
|
||||
expected: { a: 'b' }
|
||||
},{
|
||||
cs: 'a=b=c'
|
||||
expected: { a: 'b=c' }
|
||||
|
@ -103,7 +101,7 @@ testParseCookieString = ->
|
|||
expected: { a: 'b', c: 'd' }
|
||||
},{
|
||||
cs: 'a= b',
|
||||
expected: {a: 'b' }
|
||||
expected: { a: 'b' }
|
||||
},{
|
||||
cs: 'a='
|
||||
expected: { a: '' }
|
||||
|
@ -271,7 +269,7 @@ testParseAddress = ->
|
|||
testGetParamAddress = ->
|
||||
DEFAULT = { host: '1.1.1.1', port: 2222 }
|
||||
TESTS = [{
|
||||
query: { }
|
||||
query: {}
|
||||
expected: DEFAULT
|
||||
},{
|
||||
query: { addr: '3.3.3.3:4444' },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue