Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-10-06 11:54:08 +02:00
parent f3463b176b
commit 2d3a5f09ab
18 changed files with 47 additions and 32 deletions
@@ -114,7 +114,7 @@ describe('createRouter', () => {
);
expect(response.status).toEqual(200);
expect(response.text).toEqual(JSON.stringify([badge], null, 2));
expect(response.body).toEqual([badge]);
expect(catalog.getEntityByRef).toHaveBeenCalledTimes(1);
expect(catalog.getEntityByRef).toHaveBeenCalledWith(
+1 -2
View File
@@ -78,8 +78,7 @@ export async function createRouter(
specs.push(badge);
}
res.setHeader('Content-Type', 'application/json');
res.status(200).send(JSON.stringify(specs, null, 2));
res.status(200).json(specs);
});
router.get(