Skip to content

Commit

Permalink
test(core): fix imageOptimizer.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
dphang committed Apr 20, 2022
1 parent ba6b107 commit af85b5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/libs/core/tests/images/imageOptimizer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import sharp from "sharp";
import { ImagesManifest, PlatformClient } from "../../src";
import { imageOptimizer } from "../../src/images/imageOptimizer";
import imagesManifest from "./image-images-manifest.json";
import fs from "fs";
import url from "url";
import http from "http";
import Stream from "stream";
import { jest } from "@jest/globals";
import fse from "fs-extra";

jest.mock("node-fetch", () => require("fetch-mock-jest").sandbox());

Expand Down Expand Up @@ -128,8 +128,8 @@ describe("Image optimizer", () => {
};

beforeEach(() => {
fse.remove("/tmp/cache/images");
fse.remove("/tmp/cache/imageMeta");
fs.rmdirSync("/tmp/cache/images", { recursive: true });
fs.rmdirSync("/tmp/cache/imageMeta", { recursive: true });
});

describe("Routes", () => {
Expand Down

0 comments on commit af85b5f

Please sign in to comment.