From cdb789e8d30e4d5ca5be7f70ab9258b80b4a44ee Mon Sep 17 00:00:00 2001 From: joelchu Date: Fri, 21 Feb 2020 17:37:44 +0800 Subject: [PATCH 1/2] jsonql-koa to 1.5.7 --- packages/koa/package.json | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/packages/koa/package.json b/packages/koa/package.json index ec46d25b..6c1f4359 100644 --- a/packages/koa/package.json +++ b/packages/koa/package.json @@ -1,6 +1,6 @@ { "name": "jsonql-koa", - "version": "1.5.6", + "version": "1.5.7", "description": "jsonql Koa middleware", "main": "main.js", "module": "index.js", @@ -11,11 +11,11 @@ "contract.js" ], "scripts": { - "test": "ava --verbose", + "test": "ava", "prepare": "npm run contract && npm run test", "start": "node ./test/fixtures/start.js", - "test:debug": "DEBUG=jsonql* ava --verbose", - "coverage": "nyc ava --verbose", + "test:debug": "DEBUG=jsonql* ava", + "coverage": "nyc ava", "test:basic": "DEBUG=jsonql* ava ./tests/koa.test.js", "test:notfound": "DEBUG=jsonql-* ava --verbose ./tests/resolverNotFound.test.js", "test:es6": "DEBUG=jsonql-* ava --verbose ./tests/es6-module.test.js", @@ -55,10 +55,12 @@ "homepage": "jsonql.org", "ava": { "files": [ - "tests/*.test.js", - "!tests/helpers/*.*", - "!tests/fixtures/*.*", - "!tests/node-client.test.js" + "tests/*.test.js" + ], + "ignoredByWatcher": [ + "tests/helpers/*.*", + "tests/fixtures/*.*", + "tests/node-client.test.js" ], "require": [ "esm" @@ -68,33 +70,33 @@ "failFast": true, "failWithoutAssertions": false, "tap": false, - "compileEnhancements": false + "verbose": true }, "dependencies": { "debug": "^4.1.1", "esm": "^3.2.25", "fs-extra": "^8.1.0", "jsonql-constants": "^1.8.14", - "jsonql-contract": "^1.8.5", + "jsonql-contract": "^1.8.7", "jsonql-errors": "^1.1.10", "jsonql-jwt": "^1.3.8", - "jsonql-node-client": "^1.2.10", + "jsonql-node-client": "^1.2.12", "jsonql-params-validator": "^1.5.2", - "jsonql-resolver": "^1.0.7", + "jsonql-resolver": "^1.0.9", "jsonql-utils": "^0.9.7", "jsonql-web-console": "^0.4.5", "koa-compose": "^4.1.0", "lodash": "^4.17.15" }, "devDependencies": { - "ava": "^2.4.0", - "jsonql-ws-server": "^1.5.2", + "ava": "^3.3.0", + "jsonql-ws-server": "^1.5.3", "jwt-decode": "^2.2.0", "koa": "^2.11.0", "koa-bodyparser": "^4.2.1", "nb-split-tasks": "^0.6.0", "nyc": "^15.0.0", - "request": "^2.88.0", + "request": "^2.88.2", "server-io-core": "^1.2.0", "superkoa": "^1.0.3" } -- Gitee From 8ae1b2890aae60f4060ea4a36648e509906e11a4 Mon Sep 17 00:00:00 2001 From: joelchu Date: Fri, 21 Feb 2020 17:40:20 +0800 Subject: [PATCH 2/2] update throw test and passed --- packages/koa/tests/throw.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/koa/tests/throw.test.js b/packages/koa/tests/throw.test.js index 26e5aa71..ab7fcee3 100644 --- a/packages/koa/tests/throw.test.js +++ b/packages/koa/tests/throw.test.js @@ -11,6 +11,8 @@ const { test('Should able understand the Error being throw from clientErrorsHandler', async t => { + // JsonqlResolverNotFoundError some how this has a typeof function instead of object + const error = t.throws(() => { return clientErrorsHandler({ error: { @@ -18,7 +20,7 @@ test('Should able understand the Error being throw from clientErrorsHandler', as className: 'JsonqlResolverNotFoundError' } }) - }, JsonqlResolverNotFoundError, 'Only give it a statusCode to find the error to throw') + }, null, 'Only give it a statusCode to find the error to throw') }) -- Gitee