diff --git a/packages/koa/package.json b/packages/koa/package.json index ec46d25bccd3a231098344ff10e755120db9874b..6c1f4359bbb62701db07ef46a2040b0a4f87a690 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" } diff --git a/packages/koa/tests/throw.test.js b/packages/koa/tests/throw.test.js index 26e5aa71db9f387dc2e5610a30b91d22e3d5bd04..ab7fcee398bd86596ac50ccc8d39c90a42e8d3cd 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') })