Fix some linting warnings for "Line exceeds maximum allowed length."

This commit is contained in:
Arlo Breault 2019-05-08 17:27:00 -04:00
parent 5384ef9d16
commit dad53932a2
7 changed files with 27 additions and 12 deletions

View file

@ -96,7 +96,9 @@ describe 'ProxyPair', ->
}
spyOn pp.client, 'send'
spyOn pp.relay, 'send'
msg = new MessageEvent("message", { data: Uint8Array.from([1, 2, 3]).buffer })
msg = new MessageEvent("message", {
data: Uint8Array.from([1, 2, 3]).buffer
})
pp.onClientToRelayMessage(msg)
pp.flush()
expect(pp.client.send).not.toHaveBeenCalled()
@ -105,7 +107,9 @@ describe 'ProxyPair', ->
it 'proxies data from relay to client', ->
spyOn pp.client, 'send'
spyOn pp.relay, 'send'
msg = new MessageEvent("message", { data: Uint8Array.from([4, 5, 6]).buffer })
msg = new MessageEvent("message", {
data: Uint8Array.from([4, 5, 6]).buffer
})
pp.onRelayToClientMessage(msg)
pp.flush()
expect(pp.client.send).toHaveBeenCalledWith arrayMatching([4, 5, 6])

View file

@ -118,6 +118,7 @@ describe 'Parse', ->
expected: '1.2.3.4'
,
# Modified from SDP sent by snowflake-client.
# coffeelint: disable
sdp: """
v=0
o=- 7860378660295630295 2 IN IP4 127.0.0.1
@ -137,6 +138,7 @@ describe 'Parse', ->
a=mid:data
a=sctpmap:5000 webrtc-datachannel 1024
"""
# coffeelint: enable
expected: '1.2.3.4'
,
# Improper character within IPv4
@ -164,7 +166,9 @@ describe 'Parse', ->
# We represent the test cases with LF line endings for convenience, and
# test them both that way and with CRLF line endings.
expect(Parse.ipFromSDP(test.sdp)?.toLowerCase()).toEqual(test.expected)
expect(Parse.ipFromSDP(test.sdp.replace(/\n/, "\r\n"))?.toLowerCase()).toEqual(test.expected)
expect(
Parse.ipFromSDP(test.sdp.replace(/\n/, "\r\n"))?.toLowerCase()
).toEqual(test.expected)
describe 'query string', ->
it 'should parse correctly', ->

View file

@ -24,8 +24,9 @@ describe 'BuildUrl', ->
it 'should handle params', ->
expect WS.buildUrl 'http', 'example.com', 80, '/test', [['k', '%#v']]
.toBe 'http://example.com/test?k=%25%23v'
expect WS.buildUrl 'http', 'example.com', 80, '/test', [['a', 'b'], ['c', 'd']]
.toBe 'http://example.com/test?a=b&c=d'
expect(WS.buildUrl(
'http', 'example.com', 80, '/test', [['a', 'b'], ['c', 'd']]
)).toBe 'http://example.com/test?a=b&c=d'
it 'should handle ips', ->
expect WS.buildUrl 'http', '1.2.3.4'
.toBe 'http://1.2.3.4'