This commit is contained in:
Felix Ableitner 2025-01-13 11:22:10 +01:00
parent 2e7a961ecf
commit 1c12993a2c

View file

@ -40,7 +40,7 @@ afterAll(async () => {
await Promise.all([unfollows(), deleteAllImages(alpha)]);
});
test("Upload image and delete it", async () => {
test.only("Upload image and delete it", async () => {
const healthz = await fetch(alphaUrl + "/pictrs/healthz");
expect(healthz.status).toBe(200);
@ -58,7 +58,9 @@ test("Upload image and delete it", async () => {
expect(upload.delete_token).toBeDefined();
// ensure that image download is working. theres probably a better way to do this
console.log(1);
const response = await fetch(upload.image_url ?? "");
console.log(2);
const content = await response.text();
expect(content.length).toBeGreaterThan(0);
@ -85,8 +87,10 @@ test("Upload image and delete it", async () => {
token: upload.delete_token,
filename: upload.filename,
};
console.log(3);
const delete_ = await alphaImage.deleteImage(delete_form);
expect(delete_.success).toBe(true);
console.log(4);
// ensure that image is deleted
const response2 = await fetch(upload.image_url ?? "");