diff --git a/.github/workflows/npm-test.yml b/.github/workflows/npm-test.yml index 21765c0..79ea6dc 100644 --- a/.github/workflows/npm-test.yml +++ b/.github/workflows/npm-test.yml @@ -19,4 +19,4 @@ jobs: - name: Typecheck run: npx tsc - name: Run NPM Test - run: yarn test -T 1m + run: yarn test -T 5m diff --git a/tests/build-and-check-health.test.ts b/tests/build-and-check-health.test.ts index da8649a..d91a51c 100644 --- a/tests/build-and-check-health.test.ts +++ b/tests/build-and-check-health.test.ts @@ -3,7 +3,7 @@ import getPort from "get-port" import axios from "axios" import { getSampleProject } from "./fixtures/get-sample-project" -test("build and check health", async (t) => { +test.serial("build and check health", async (t) => { const {getNsmIndex} = await getSampleProject() const port = await getPort() const server = await getNsmIndex({ port }) diff --git a/tests/build-nextless-and-check-health.test.ts b/tests/build-nextless-and-check-health.test.ts index 65dd122..38c228c 100644 --- a/tests/build-nextless-and-check-health.test.ts +++ b/tests/build-nextless-and-check-health.test.ts @@ -3,7 +3,7 @@ import getPort from "get-port" import axios from "axios" import { getSampleProject } from "./fixtures/get-sample-project-without-next" -test("build and check health", async (t) => { +test.serial("build and check health", async (t) => { const {getNsmIndex} = await getSampleProject() const port = await getPort() const server = await getNsmIndex({ port }) diff --git a/tests/build-without-next-and-check-health.test.ts b/tests/build-without-next-and-check-health.test.ts deleted file mode 100644 index 65dd122..0000000 --- a/tests/build-without-next-and-check-health.test.ts +++ /dev/null @@ -1,16 +0,0 @@ -import test from "ava" -import getPort from "get-port" -import axios from "axios" -import { getSampleProject } from "./fixtures/get-sample-project-without-next" - -test("build and check health", async (t) => { - const {getNsmIndex} = await getSampleProject() - const port = await getPort() - const server = await getNsmIndex({ port }) - - const { data: res } = await axios.get(`http://localhost:${port}/api/health`) - - t.truthy(res.includes("healthy!")) - - server.close() -}) diff --git a/tests/dynamic-catchall.test.ts b/tests/dynamic-catchall.test.ts index 659499e..516c1d1 100644 --- a/tests/dynamic-catchall.test.ts +++ b/tests/dynamic-catchall.test.ts @@ -3,7 +3,7 @@ import getPort from "get-port" import axios from "axios" import { getSampleProject } from "./fixtures/get-sample-project" -test("dynamic catchall path", async (t) => { +test.serial("dynamic catchall path", async (t) => { const {getNsmIndex} = await getSampleProject() const port = await getPort() diff --git a/tests/no-rewrite-with-query.test.ts b/tests/no-rewrite-with-query.test.ts index 16573fc..fedcceb 100644 --- a/tests/no-rewrite-with-query.test.ts +++ b/tests/no-rewrite-with-query.test.ts @@ -2,7 +2,7 @@ import test from "ava" import axios from "axios" import { getSampleProject } from "./fixtures/get-sample-project" -test("no rewrite with query", async (t) => { +test.serial("no rewrite with query", async (t) => { const {getServerFixture} = await getSampleProject() const {serverURL} = await getServerFixture(t) diff --git a/tests/resolve-rewrites.test.ts b/tests/resolve-rewrites.test.ts index 50ae725..600e8a1 100644 --- a/tests/resolve-rewrites.test.ts +++ b/tests/resolve-rewrites.test.ts @@ -2,7 +2,7 @@ import test from "ava" import { parseUrl } from "nsm/nextjs-middleware/parse-url" import resolveRewrites from "nsm/nextjs-middleware/resolve-rewrites" -test("resolve rewrites /health -> /api/health", async (t) => { +test.serial("resolve rewrites /health -> /api/health", async (t) => { const result = resolveRewrites( "/health", ["/api/health"], diff --git a/tests/streaming.test.ts b/tests/streaming.test.ts index a05b5bc..ece2d4c 100644 --- a/tests/streaming.test.ts +++ b/tests/streaming.test.ts @@ -1,7 +1,7 @@ import test from "ava" import { getSampleProject } from "./fixtures/get-sample-project" -test("streaming", async (t) => { +test.serial("streaming", async (t) => { const {getServerFixture} = await getSampleProject() const {axios} = await getServerFixture(t) diff --git a/tests/wait-for-server.test.ts b/tests/wait-for-server.test.ts index 1455021..a7f34f9 100644 --- a/tests/wait-for-server.test.ts +++ b/tests/wait-for-server.test.ts @@ -2,7 +2,7 @@ import test from "ava" import getPort from "get-port" import { getSampleProject } from "./fixtures/get-sample-project" -test("wait for server to start or throw", async (t) => { +test.serial("wait for server to start or throw", async (t) => { const { getNsmIndex } = await getSampleProject() const port = await getPort()