From c28055f2ca5e66bf5f66831c774f9a4d684fe85d Mon Sep 17 00:00:00 2001 From: "CATERPILLAR\\Braxen" Date: Wed, 17 Apr 2024 13:22:46 +0200 Subject: [PATCH] api test default check inversion --- client-vue/package.json | 2 +- server/src/Extend/express-api.ts | 4 ++-- server/tests/api.test.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client-vue/package.json b/client-vue/package.json index 644f8c7a..d32883b5 100644 --- a/client-vue/package.json +++ b/client-vue/package.json @@ -71,4 +71,4 @@ "engines": { "node": ">=20" } -} \ No newline at end of file +} diff --git a/server/src/Extend/express-api.ts b/server/src/Extend/express-api.ts index e5044bc5..19938880 100644 --- a/server/src/Extend/express-api.ts +++ b/server/src/Extend/express-api.ts @@ -33,9 +33,9 @@ export function applyExpressApiFunction(app: express.Express) { "http.api", `API error ${status} returned: ${JSON.stringify(data)}` ); - console.trace( + /* console.trace( `API error ${status} returned: ${JSON.stringify(data)}` - ); + ); */ } }; } diff --git a/server/tests/api.test.ts b/server/tests/api.test.ts index b10b59b9..cad59a33 100644 --- a/server/tests/api.test.ts +++ b/server/tests/api.test.ts @@ -118,7 +118,7 @@ describe("settings", () => { console.error("Field is undefined", key); continue; } - if ("default" in field && !field.default) { + if (!("default" in field) || !field.default) { console.error("Field has no default", key); continue; }