From 3399dfb8c075383b7e2151a6718c704b84adf1e0 Mon Sep 17 00:00:00 2001 From: LvffY Date: Sat, 2 Apr 2022 17:41:48 +0200 Subject: [PATCH] =?UTF-8?q?[#10582]=20=F0=9F=91=8C=20Pass=20prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: LvffY (cherry picked from commit a103befad1950863049a5711471500690d6eb2bd) --- plugins/todo-backend/README.md | 2 +- .../src/service/TodoReaderService.test.ts | 25 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/plugins/todo-backend/README.md b/plugins/todo-backend/README.md index 0f4342c19d..4686c2d39f 100644 --- a/plugins/todo-backend/README.md +++ b/plugins/todo-backend/README.md @@ -52,7 +52,7 @@ async function main() { ## Scanned Files -The included `TodoReaderService` and `TodoScmReader` works by getting the entity source location from the catalog. +The included `TodoReaderService` and `TodoScmReader` works by getting the entity source location from the catalog. The location source code is determined automatically. In case of the source code of the component is not in the same place of the entity YAML file, you can explicitly set the value of the [`backstage.io/source-location`](https://backstage.io/docs/features/software-catalog/well-known-annotations#backstageiosource-location) annotation of the entity, and if that is missing it falls back to the [`backstage.io/managed-by-location `](https://backstage.io/docs/features/software-catalog/well-known-annotations#backstageiomanaged-by-location) annotation. Only `url` locations are currently supported, meaning locally configured `file` locations won't work. Also note that dot-files and folders are ignored. diff --git a/plugins/todo-backend/src/service/TodoReaderService.test.ts b/plugins/todo-backend/src/service/TodoReaderService.test.ts index f99a9b7502..b16f0ee669 100644 --- a/plugins/todo-backend/src/service/TodoReaderService.test.ts +++ b/plugins/todo-backend/src/service/TodoReaderService.test.ts @@ -321,8 +321,7 @@ describe('TodoReaderService', () => { await expect(service.listTodos({ entity: entityName })).rejects.toEqual( expect.objectContaining({ name: 'Error', - message: - 'Entity \'component:default/my-component\' is missing location', + message: "Entity 'component:default/my-component' is missing location", }), ); }); @@ -341,12 +340,11 @@ describe('TodoReaderService', () => { const service = new TodoReaderService({ todoReader, catalogClient }); await expect(service.listTodos({ entity: entityName })).resolves.toEqual({ - items: [], - totalCount: 0, - offset: 0, - limit: 10, - } - ); + items: [], + totalCount: 0, + offset: 0, + limit: 10, + }); }); it('should not throw if entity has an invalid source location', async () => { @@ -363,11 +361,10 @@ describe('TodoReaderService', () => { const service = new TodoReaderService({ todoReader, catalogClient }); await expect(service.listTodos({ entity: entityName })).resolves.toEqual({ - items: [], - totalCount: 0, - offset: 0, - limit: 10, - } - ); + items: [], + totalCount: 0, + offset: 0, + limit: 10, + }); }); });