mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-12 15:37:27 +01:00
cleanup
This commit is contained in:
@@ -128,7 +128,7 @@ test.describe.serial("Upload Item", () => {
|
|||||||
await context?.dispose();
|
await context?.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("upload document", async ({}, testInfo) => {
|
test("upload document", async () => {
|
||||||
// Create file to upload
|
// Create file to upload
|
||||||
const TestDataJsonString: string = JSON.stringify(TestData, null, 2);
|
const TestDataJsonString: string = JSON.stringify(TestData, null, 2);
|
||||||
writeFileSync(uploadDocumentFilePath, TestDataJsonString);
|
writeFileSync(uploadDocumentFilePath, TestDataJsonString);
|
||||||
@@ -150,7 +150,7 @@ test.describe.serial("Upload Item", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test("upload same document twice", async ({}, testInfo) => {
|
test("upload same document twice", async () => {
|
||||||
// Create file to upload
|
// Create file to upload
|
||||||
const TestDataJsonString: string = JSON.stringify(TestData, null, 2);
|
const TestDataJsonString: string = JSON.stringify(TestData, null, 2);
|
||||||
writeFileSync(uploadDocumentFilePath, TestDataJsonString);
|
writeFileSync(uploadDocumentFilePath, TestDataJsonString);
|
||||||
@@ -186,7 +186,7 @@ test.describe.serial("Upload Item", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("upload invalid json", async ({}, testInfo) => {
|
test("upload invalid json", async () => {
|
||||||
// Create file to upload
|
// Create file to upload
|
||||||
let TestDataJsonString: string = JSON.stringify(TestData, null, 2);
|
let TestDataJsonString: string = JSON.stringify(TestData, null, 2);
|
||||||
// Remove the first '[' so that it becomes invalid json
|
// Remove the first '[' so that it becomes invalid json
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ function createSafeRandomString(byteLength: number): string {
|
|||||||
return crypto
|
return crypto
|
||||||
.randomBytes(byteLength)
|
.randomBytes(byteLength)
|
||||||
.toString("base64")
|
.toString("base64")
|
||||||
.replace(/[\/\\#]/g, "_");
|
.replace(/[\\#]/g, "_");
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TestData: TestItem[] = createTestItems();
|
export const TestData: TestItem[] = createTestItems();
|
||||||
|
|||||||
Reference in New Issue
Block a user