Commit graph

29 commits

Author SHA1 Message Date
Ruben Bridgewater
8f047ddb84 fix: use non deprecated custom inspect (#1198)
Custom inspection with the `inspect` property is deprecated and will
not work in Node.js 11 anymore. This fixes it by using the custom
inspect symbol where existent and falls back to the old style in case
it does not exist.
2018-06-25 10:34:15 +08:00
initial-wu
ee1a933096 fix: Throw a TypeError instead of a AssertionError (#1199) 2018-06-06 12:55:20 +08:00
Yiyu He
3c23aa5b74
feat: ignore set header/status when header sent (#1137) 2018-02-11 16:25:24 +08:00
JamesWang
77ca4290a1 test: replace request(app.listen()) with request(app.callback()) 2017-09-25 23:07:57 -05:00
jongleberry
86ab4ae84a Revert "refactor: remove duplicate assignment in respond test (#1055)" (#1056)
This reverts commit c161c0f2e9.
2017-09-11 21:35:13 -05:00
Clark Du
c161c0f2e9 refactor: remove duplicate assignment in respond test (#1055)
Signed-off-by: Clark Du <clark.duxin@gmail.com>
2017-09-11 10:22:34 -07:00
Gilles De Mey
d394724200 test: Use Jest (#981) 2017-05-11 11:30:32 +08:00
Martin Iwanowski
3721f6be0b test: remove redudant test case (#956) 2017-04-12 23:41:38 -06:00
Fangdun Cai
18d753ca2d use Buffer.from instead (#946) 2017-03-20 14:48:37 +08:00
jongleberry
4816cd76f0 :arrow-up: deps
closes #939
2017-03-14 01:55:15 -07:00
Avindra Goolcharan
2a16426afe nit: fix grammar in generator deprecation warning (#834)
This fixes the tense of `will been` to `will be`
2016-10-17 17:45:06 +02:00
jongleberry
be87ef8a24 lint: upgrade packages, fix generator star spacing 2016-03-28 14:21:05 -07:00
Martin Iwanowski
0ac4ff00c6 Convert generator-mw with deprecation warning 2016-03-22 07:35:05 +01:00
Lee Bousfield
6a147726bd Add support for flushing headers 2016-03-03 21:01:56 -07:00
Yanick Rochon
d134fff9e8 Fix issue when app.use() is called with empty value 2015-11-25 12:10:55 +08:00
broucz
4b1a1da652 test: switch all functions to arrow functions
closes #553

Update test: application -> use() should throw if not a function

Fix lint

Use arrow function

Refactor test using arrow function

Remove non mandatory brackets

fix for merge

Fix: missing refactor after merge

Use arrow function for old generator
2015-11-02 11:22:05 -08:00
TJ Holowaychuk
439f051776 Merge pull request #570 from koajs/fix-app-inspect
fix Application.inspect() – missing .proxy value. Closes #563
2015-10-31 11:15:09 -07:00
blaz
3560651bbc Add usage of koa-convert for legacy middleware
closes #565
closes #538
2015-10-30 20:20:00 -07:00
TJ Holowaychuk
aa1fbbff4a fix Application.inspect() – missing .proxy value. Closes #563
fix trailing comma
2015-10-29 09:56:15 -07:00
Slobodan Stojanovic
b08facb7bd Fix indentation and add .eslint rules
closes #555
2015-10-29 09:55:34 -07:00
Felix Becker
ebb4850709 Remove co dependency
closes #558
closes #557

Change tests to use plain functions and promises

Add test

return promise in middleware

Change benchmarks to use plain functions and promises

typeerror
2015-10-27 16:24:25 -07:00
Slobodan Stojanovic
cc1d41f5e3 Refactor tests - add arrow functions
Refactor tests - move .should to the same line as arrow function
2015-10-25 13:26:36 -07:00
broucz
e859c602d1 Update test: application -> use() should throw if not a function
closes #550

Fix lint

Use arrow function

Remove not necessary import
2015-10-25 12:53:05 -07:00
jongleberry
2e8cdab8bc support async functions
closes #530
closes #415
2015-10-22 16:34:59 -07:00
jongleberry
16db0f60c4 eslint: add no-var rule 2015-10-22 15:46:47 -07:00
Santiago Sotomayor
0c438ed435 unset content-type when the type is unknown
closes #532
closes #536
2015-10-22 15:39:16 -07:00
Michaël Zasso
b5c09a1719 test: fix style issues 2015-10-13 09:23:57 +02:00
Tejas Manohar
93ade5e2dd refactor Application into a class 2015-10-13 01:19:42 -05:00
Tejas Manohar
e8f79d43f9 modularize tests for application
closes #517

add index test for Application

add app.toJSON test

add test for app.inspect()

add tests for app.use()

add tests for app.onerror()

add tests for app.respond()

add tests for app.context()

add tests for app.request()

add tests for app.response

refactor for non-existence of test/app...js

no need for *.js

use helpers/ dir for non-tests
2015-10-12 00:08:06 -07:00