Skip to content

Commit

Permalink
fix test hanging up
Browse files Browse the repository at this point in the history
  • Loading branch information
charlypoly committed Mar 6, 2024
1 parent 0c4e015 commit d88da58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
13 changes: 12 additions & 1 deletion tests/next/asNextRoute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextRequest } from "next/server";
import helloWorld from "./fixtures/helloWorld";
import { POST, GET } from "./fixtures/route";
import { POST as POSTWithProxy } from "./fixtures/routeWithProxy";
import { getExecution } from "../../src/index";
import { backend, getExecution } from "../../src/index";
import { ExecutionNotFound } from "../../src/backend";

jest.mock("./fixtures/helloWorld");
Expand All @@ -15,6 +15,17 @@ jest.mock("../../src/index", () => {
};
});

var stop: () => Promise<void> | undefined;

beforeAll(function () {
stop = (backend as any).start();
});

afterAll(function () {
stop();
});


describe("asNextRoute()", () => {
describe("POST() - background function invocation", () => {
describe("valid empty params, without proxy", () => {
Expand Down
10 changes: 0 additions & 10 deletions tests/next/useDeferRoute.test.ts

This file was deleted.

0 comments on commit d88da58

Please sign in to comment.