chore: format code with semicolons when using prettier (#9555)

This commit is contained in:
Kayla Washburn
2023-09-06 12:59:26 -06:00
committed by GitHub
parent bef38b8413
commit 988c9af015
664 changed files with 17537 additions and 17407 deletions
+9 -9
View File
@@ -128,9 +128,9 @@ export const getAgentListeningPorts = async (
): Promise<TypesGen.ListeningPortsResponse> => {
const response = await axios.get(
`/api/v2/workspaceagents/${agentID}/listening-ports`,
)
return response.data
}
);
return response.data;
};
```
Sometimes, a FE operation can have multiple API calls so it is ok to wrap it as
@@ -140,9 +140,9 @@ a single function.
export const updateWorkspaceVersion = async (
workspace: TypesGen.Workspace,
): Promise<TypesGen.WorkspaceBuild> => {
const template = await getTemplate(workspace.template_id)
return startWorkspace(workspace.id, template.active_version_id)
}
const template = await getTemplate(workspace.template_id);
return startWorkspace(workspace.id, template.active_version_id);
};
```
If you need more granular errors or control, you may should consider keep them
@@ -242,14 +242,14 @@ instead of using `screen.getByRole("button")` directly we could do
slow.
```tsx
user.click(screen.getByRole("button"))
user.click(screen.getByRole("button"));
```
✅ Better. We can limit the number of elements we are querying.
```tsx
const form = screen.getByTestId("form")
user.click(within(form).getByRole("button"))
const form = screen.getByTestId("form");
user.click(within(form).getByRole("button"));
```
#### `jest.spyOn` with the API is not working