Skip to content

Commit

Permalink
test: enable dev tests on ci (#2858)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Nov 7, 2024
1 parent 28bdfbb commit e648406
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
3 changes: 1 addition & 2 deletions test/presets/nitro-dev.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { OpenAPI3 } from "openapi-typescript";
import { isCI } from "std-env";
import { describe, expect, it } from "vitest";
import { setupTest, testNitro } from "../tests";

describe.skipIf(isCI)("nitro:preset:nitro-dev", async () => {
describe("nitro:preset:nitro-dev", async () => {
const ctx = await setupTest("nitro-dev");
testNitro(
ctx,
Expand Down
17 changes: 10 additions & 7 deletions test/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,15 @@ export function testNitro(
expect(status).toBe(503);
});

it("universal import.meta", async () => {
const { status, data } = await callHandler({ url: "/api/import-meta" });
expect(status).toBe(200);
expect(data.testFile).toMatch(/[/\\]test.txt$/);
expect(data.hasEnv).toBe(true);
});
it.skipIf(isWindows && ctx.preset === "nitro-dev")(
"universal import.meta",
async () => {
const { status, data } = await callHandler({ url: "/api/import-meta" });
expect(status).toBe(200);
expect(data.testFile).toMatch(/[/\\]test.txt$/);
expect(data.hasEnv).toBe(true);
}
);

it("handles custom server assets", async () => {
const { data: html, status: htmlStatus } = await callHandler({
Expand Down Expand Up @@ -698,7 +701,7 @@ export function testNitro(
});

describe("cache", () => {
it.skipIf(ctx.isIsolated)(
it.skipIf(ctx.isIsolated || (isWindows && ctx.preset === "nitro-dev"))(
"should setItem before returning response the first time",
async () => {
const {
Expand Down

0 comments on commit e648406

Please sign in to comment.