todo-backend: review suggestions

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-03-11 17:50:29 +01:00
parent 0d7db68595
commit e1d3fcf1c0
5 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-todo-backend",
"version": "0.1.1",
"version": "0.1.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -74,8 +74,6 @@ export class TodoReaderService implements TodoService {
let offset = req.offset ?? 0;
if (offset < 0) {
offset = 0;
} else if (offset - limit > totalCount) {
offset = totalCount - limit;
}
let items = todos.items;
@@ -44,7 +44,7 @@ describe('createRouter', () => {
jest.resetAllMocks();
});
describe('GET /health', () => {
describe('GET /todos', () => {
it('returns list without query', async () => {
mockService.listTodos.mockResolvedValueOnce(mockListBody);