Skip to content

Commit

Permalink
Explicit vows version
Browse files Browse the repository at this point in the history
  • Loading branch information
n4kz committed Mar 27, 2015
1 parent bfe3d38 commit 0525834
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -13,7 +13,7 @@
"crixalis": "bin/crixalis"
},
"devDependencies": {
"vows": ">=0.6.0",
"vows": "^0.8.0",
"coffee-script": ">=1.6.0",
"yuidocjs": ">=0.3.30"
},
Expand Down
22 changes: 13 additions & 9 deletions t/04-events.coffee
Expand Up @@ -83,19 +83,21 @@ vows
.describe('events')
.addBatch
order:
topic: () ->
topic: ->
responses = {}
remains = 0
params =
host: '127.0.0.1'
port: port

cb = (error, result) =>
assert not error, 'got result'
assert.equal result.statusCode, 200, 'code 200'
assert not error, 'got result'
assert.equal result.statusCode, 200, 'code 200'

unless --remains
@callback undefined, responses
@callback true, responses

return

# Load compression plugin
Crixalis.plugin 'compression'
Expand All @@ -121,10 +123,12 @@ vows
hs.call @
responses[@name] = @events

for path in '''
normal default error compression ecompression dcompression
anormal adefault aerror acompression aecompression adcompression
'''.replace(/\n/, ' ').split ' '
endpoints = [
'normal', 'default', 'error', 'compression', 'ecompression', 'dcompression'
'anormal', 'adefault', 'aerror', 'acompression', 'aecompression', 'adcompression'
]

for path in endpoints
remains++
options = copy params
options.path = '/match/' + path
Expand All @@ -137,7 +141,7 @@ vows

fetch options, cb

undefined
return

normal: (error, responses) ->
events = responses.normal
Expand Down
24 changes: 12 additions & 12 deletions t/06-params.coffee
Expand Up @@ -70,7 +70,7 @@ vows
topic: (topic) ->
params = copy topic
fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -81,7 +81,7 @@ vows
params = copy topic
params.path = '/get?p1=1;p2=2;p3=3'
fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -92,7 +92,7 @@ vows
params = copy topic
params.path = '/get?p1=1&p2=2&p3=3'
fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -106,7 +106,7 @@ vows
params.headers = 'content-type': 'application/x-www-form-urlencoded'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -121,7 +121,7 @@ vows
params.headers = 'content-type': 'application/x-www-form-urlencoded'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -136,7 +136,7 @@ vows
params.headers = 'content-type': 'application/x-www-form-urlencoded'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -151,7 +151,7 @@ vows
params.data = 'p1=3+5&p3=2%2B9'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -172,7 +172,7 @@ vows
params.data += 'F'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -187,7 +187,7 @@ vows
params.data = 'text'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -201,7 +201,7 @@ vows
params.data = 'text'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -217,7 +217,7 @@ vows
params.data = '{"text": "mytext"}'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand All @@ -233,7 +233,7 @@ vows
params.data = '{"text": mytext}'

fetch params, @callback
undefined
return

response: (error, response) ->
assert not error
Expand Down

0 comments on commit 0525834

Please sign in to comment.