Closed nickserv closed 7 years ago
sorry, haven't maintained this in a while. i'm sure there are a lot of issues with this repo. are you interested in maintaining it?
I'm interested
I'm not sure I can take over all maintenance, but I'm at least interesting in helping out. Is there a plan or a set of blocking issues for Koa 2 and modern Node support?
This seems to be specific to node 6
i-200077 foss/koala ‹master*› » node -v
v8.4.0
i-200077 foss/koala ‹master*› » npm test
> koala@1.0.0 test /Users/dwade/foss/koala
> NODE_ENV=test mocha --reporter spec --timeout 30s --bail test/app/index.js
Basic Auth
✓ should return the value
Body Parsing
.request.json()
✓ should parse a json body
✓ should throw on non-objects in strict mode
✓ should not throw on non-objects in non-strict mode
.request.urlencoded()
✓ should parse a urlencoded body
✓ should not support nested query strings by default
✓ should support nested query strings with options.qs=true
.request.text()
✓ should get the raw text body
✓ should throw if the body is too large
.request.buffer()
✓ should get the raw buffer body
✓ should throw if the body is too large
Expect: 100-continue
✓ should send 100-continue
Cache-Control
should be available as
✓ this.cc()
✓ this.cacheControl()
✓ this.response.cc()
✓ this.cacheControl()
when the value is a number
✓ should set "public, max-age="
when the value is a time string
✓ should set "public, max-age="
when the value is "false"
✓ should set "private, no-cache"
when the value is a string
✓ should juset set it
when the value is anything else
✓ should throw
Conditional-Get
when a body is set
✓ should set an etag
✓ should response 304 w/ if-none-match header
Set headers
X-Response-Time
✓ should get X-Response-Time correctly by default
✓ should not get X-Response-Time by options.responseTime = false
X-Frame-Options
✓ should get X-Frame-Options DENY by default
✓ should not get X-Frame-Options by xframe = false
✓ should get X-Frame-Options DENY by xframe = true
✓ should get X-Frame-Options SAMEORIGIN by xframe = same
jsonp
✓ should return jsonp response
✓ should return json response
Middlewares
Session
✓ should has this.session by default
✓ should has no this.session by options.session = false
Object Streams
✓ should be supported
Polyfills
GET /polyfill.js
- should return the polyfill
Nested Query Strings
when options.qs = false
✓ should not support nested query strings
when options.qs = true
✓ should support nested query strings
36 passing (280ms)
1 pending
Good catch. See #37 for troubleshooting, it's only failing on 6. I would definitely still want to fix this because it's the current LTS version.
Node's net library has a breaking change in Node 6, which performs validation on the port in the listen method.