mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-07-11 06:25:58 +01:00
fix formatting
This commit is contained in:
parent
e626f5218d
commit
d862b929ec
@ -35,19 +35,22 @@ import { QueryCopilotState, useQueryCopilot } from "hooks/useQueryCopilot";
|
|||||||
import { useTabs } from "hooks/useTabs";
|
import { useTabs } from "hooks/useTabs";
|
||||||
import * as StringUtility from "../../../Shared/StringUtility";
|
import * as StringUtility from "../../../Shared/StringUtility";
|
||||||
|
|
||||||
async function fetchWithTimeout(url: string, headers: {
|
async function fetchWithTimeout(
|
||||||
[x: string]: string;
|
url: string,
|
||||||
}) {
|
headers: {
|
||||||
|
[x: string]: string;
|
||||||
|
},
|
||||||
|
) {
|
||||||
const timeout = 10000;
|
const timeout = 10000;
|
||||||
const options = { timeout };
|
const options = { timeout };
|
||||||
|
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const id = setTimeout(() => controller.abort(), timeout);
|
const id = setTimeout(() => controller.abort(), timeout);
|
||||||
|
|
||||||
const response = await window.fetch(url, {
|
const response = await window.fetch(url, {
|
||||||
headers,
|
headers,
|
||||||
...options,
|
...options,
|
||||||
signal: controller.signal
|
signal: controller.signal,
|
||||||
});
|
});
|
||||||
clearTimeout(id);
|
clearTimeout(id);
|
||||||
|
|
||||||
|
@ -43,6 +43,6 @@ test("Resource token", async () => {
|
|||||||
name: "explorer",
|
name: "explorer",
|
||||||
});
|
});
|
||||||
await explorer.textContent(`css=.dataResourceTree >> "${collectionId}"`, {
|
await explorer.textContent(`css=.dataResourceTree >> "${collectionId}"`, {
|
||||||
timeout: 50000
|
timeout: 50000,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user