🐛 #23 Fix throw error when file doesn't exist

* #23 Fix throw error when file doesn't exist
Run all the tests in once without special runner
Add positive scenario
Move coverage to the backend build workflow
This commit is contained in:
Anton Shepilov
2023-05-01 19:45:28 +02:00
committed by GitHub
parent 11c0c35eb2
commit fd03040d73
15 changed files with 121 additions and 82 deletions
+3
View File
@@ -50,6 +50,9 @@ export async function formatUser(
const companies = await Promise.all(
userCompanies.map(async uc => {
const company = await gr.services.companies.getCompany({ id: uc.group_id });
if (!company) {
throw new Error(`Company with id ${uc.group_id} doesn't exists!`);
}
return {
role: uc.role as CompanyUserRole,
status: "active" as CompanyUserStatus, // FIXME: with real status