Skip to content

Commit e98dced

Browse files
committed
test: use memory cache storage in dev fixture to avoid flaky cache test
1 parent b009ca4 commit e98dced

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎test/fixture/nitro.config.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { dirname, resolve } from "node:path";
55
export default defineNitroConfig({
66
compressPublicAssets: true,
77
compatibilityDate: "latest",
8+
// Cache writes are not awaited before responding; the default fs-backed dev
9+
// cache can lose that race on slow runners and flake the cache tests
10+
devStorage: {
11+
cache: { driver: "memory" },
12+
},
813
framework: {
914
name: "nitro",
1015
version: "2.x",

‎test/tests.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ export function testNitro(
752752
});
753753

754754
describe("cache", () => {
755-
it.skipIf(ctx.isIsolated || (isWindows && ctx.preset === "nitro-dev"))(
755+
it.skipIf(ctx.isIsolated)(
756756
"should setItem before returning response the first time",
757757
async () => {
758758
const {

0 commit comments

Comments
 (0)