mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-31 03:10:23 +00:00
test
This commit is contained in:
parent
2e7a961ecf
commit
1c12993a2c
1 changed files with 5 additions and 1 deletions
|
@ -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 ?? "");
|
||||
|
|
Loading…
Reference in a new issue