fix formatting

This commit is contained in:
Sung-Hyun Kang (from Dev Box) 2023-11-10 15:18:51 -06:00
parent e626f5218d
commit d862b929ec
2 changed files with 9 additions and 6 deletions

View File

@ -35,19 +35,22 @@ import { QueryCopilotState, useQueryCopilot } from "hooks/useQueryCopilot";
import { useTabs } from "hooks/useTabs";
import * as StringUtility from "../../../Shared/StringUtility";
async function fetchWithTimeout(url: string, headers: {
[x: string]: string;
}) {
async function fetchWithTimeout(
url: string,
headers: {
[x: string]: string;
},
) {
const timeout = 10000;
const options = { timeout };
const controller = new AbortController();
const id = setTimeout(() => controller.abort(), timeout);
const response = await window.fetch(url, {
headers,
...options,
signal: controller.signal
signal: controller.signal,
});
clearTimeout(id);

View File

@ -43,6 +43,6 @@ test("Resource token", async () => {
name: "explorer",
});
await explorer.textContent(`css=.dataResourceTree >> "${collectionId}"`, {
timeout: 50000
timeout: 50000,
});
});