summary refs log tree commit diff
path: root/api/tests
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-21 22:52:30 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-21 22:52:30 +0200
commitabdce76df4b6aa3a063b496e6c0575c54e9fa397 (patch)
treec135233da7c327eeb52f143a2632f5d5bd4b65b5 /api/tests
parent:bug: fix unittests (diff)
downloadserver-abdce76df4b6aa3a063b496e6c0575c54e9fa397.tar.xz
:sparkles: generate openapi documentation
Diffstat (limited to 'api/tests')
-rw-r--r--api/tests/routes.test.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/tests/routes.test.ts b/api/tests/routes.test.ts
index 0473c579..a9c75df1 100644
--- a/api/tests/routes.test.ts
+++ b/api/tests/routes.test.ts
@@ -9,7 +9,7 @@ import addFormats from "ajv-formats";
 import fetch from "node-fetch";
 import { User } from "@fosscord/util";
 
-const SchemaPath = join(__dirname, "..", "assets", "responses.json");
+const SchemaPath = join(__dirname, "..", "assets", "schemas.json");
 const schemas = JSON.parse(fs.readFileSync(SchemaPath, { encoding: "utf8" }));
 export const ajv = new Ajv({
 	allErrors: true,
@@ -64,7 +64,7 @@ describe("Automatic unit tests with route description middleware", () => {
 	routes.forEach((route, pathAndMethod) => {
 		const [path, method] = pathAndMethod.split("|");
 
-		test(path, async (done) => {
+		test(`${method.toUpperCase()} ${path}`, async (done) => {
 			if (!route.test) {
 				console.log(`${(route as any).file}\nrouter.${method} is missing the test property`);
 				return done();