From 2e9d3965e442a3dbeac38348a061c8814e3f1810 Mon Sep 17 00:00:00 2001 From: "yonatan.bendahan@gmail.com" Date: Wed, 4 Oct 2023 09:43:33 +0300 Subject: [PATCH] fix test for new fastify --- package.json | 28 ++++++++++----------- test/regular-server-ts-and-js/index.spec.ts | 2 +- test/regular-server-windows/index.spec.ts | 2 +- test/regular-server/index.spec.ts | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 2d5bee4..fb07b5d 100644 --- a/package.json +++ b/package.json @@ -43,21 +43,21 @@ "node": ">=12.x.x" }, "dependencies": { - "fastify-plugin": "^4.2.1" + "fastify-plugin": "^4.5.1" }, "devDependencies": { - "@ava/typescript": "^3.0.1", - "@types/node": "^12.7.8", - "@typescript-eslint/eslint-plugin": "^5.27.1", - "@typescript-eslint/parser": "^5.27.1", - "ava": "^4.3.0", - "esbuild": "^0.14.30", - "eslint": "^8.17.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-prettier": "^3.1.3", - "fastify": "^4.5.3", - "prettier": "^2.0.5", - "ts-node": "^10.2.0", - "typescript": "^4.7.3" + "@ava/typescript": "^4.1.0", + "@types/node": "^20.8.2", + "@typescript-eslint/eslint-plugin": "^6.7.4", + "@typescript-eslint/parser": "^6.7.4", + "ava": "^5.3.1", + "esbuild": "^0.19.4", + "eslint": "^8.50.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "fastify": "^4.23.2", + "prettier": "^3.0.3", + "ts-node": "^10.9.1", + "typescript": "^5.2.2" } } diff --git a/test/regular-server-ts-and-js/index.spec.ts b/test/regular-server-ts-and-js/index.spec.ts index c578055..5ebe1b3 100644 --- a/test/regular-server-ts-and-js/index.spec.ts +++ b/test/regular-server-ts-and-js/index.spec.ts @@ -101,7 +101,7 @@ test('/book GET should fail over no query string schema validation', async (t) = }); t.is( res.body, - `{"statusCode":400,"error":"Bad Request","message":"querystring must have required property 'name'"}`, + `{"statusCode":400,"code":"FST_ERR_VALIDATION","error":"Bad Request","message":"querystring must have required property 'name'"}`, ); t.is(res.statusCode, 400); }); diff --git a/test/regular-server-windows/index.spec.ts b/test/regular-server-windows/index.spec.ts index 38bcf44..45188cd 100644 --- a/test/regular-server-windows/index.spec.ts +++ b/test/regular-server-windows/index.spec.ts @@ -101,7 +101,7 @@ test('/book GET should fail over no query string schema validation', async (t) = }); t.is( res.body, - `{"statusCode":400,"error":"Bad Request","message":"querystring must have required property 'name'"}`, + '{"statusCode":400,"code":"FST_ERR_VALIDATION","error":"Bad Request","message":"querystring must have required property \'name\'"}', ); t.is(res.statusCode, 400); }); diff --git a/test/regular-server/index.spec.ts b/test/regular-server/index.spec.ts index d29a32c..0ce4eb3 100644 --- a/test/regular-server/index.spec.ts +++ b/test/regular-server/index.spec.ts @@ -101,7 +101,7 @@ test('/book GET should fail over no query string schema validation', async (t) = }); t.is( res.body, - `{"statusCode":400,"error":"Bad Request","message":"querystring must have required property 'name'"}`, + '{"statusCode":400,"code":"FST_ERR_VALIDATION","error":"Bad Request","message":"querystring must have required property \'name\'"}', ); t.is(res.statusCode, 400); });