chore: More flakey test improvements (#5801)
This commit is contained in:
@@ -4,11 +4,9 @@ import { buildDocument, buildUser } from "@server/test/factories";
|
||||
import { getTestServer } from "@server/test/support";
|
||||
import resolvers from "@server/utils/unfurl";
|
||||
|
||||
jest.mock("@server/utils/unfurl", () => ({
|
||||
Iframely: {
|
||||
unfurl: jest.fn(),
|
||||
},
|
||||
}));
|
||||
jest
|
||||
.spyOn(resolvers.Iframely, "unfurl")
|
||||
.mockImplementation(async (_: string) => false);
|
||||
|
||||
const server = getTestServer();
|
||||
|
||||
@@ -166,6 +164,7 @@ describe("#urls.unfurl", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
const body = await res.json();
|
||||
|
||||
expect(resolvers.Iframely.unfurl).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user