Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+39
@@ -0,0 +1,39 @@
|
||||
// @vitest-environment node
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const cacheBootstrap = vi.hoisted(() => ({
|
||||
evaluations: 0,
|
||||
start: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("./cache-bootstrap.server", () => {
|
||||
cacheBootstrap.evaluations += 1;
|
||||
return { startCacheSubscribers: cacheBootstrap.start };
|
||||
});
|
||||
|
||||
describe("entry runtime bootstrap boundary", () => {
|
||||
beforeEach(() => {
|
||||
vi.resetModules();
|
||||
cacheBootstrap.evaluations = 0;
|
||||
cacheBootstrap.start.mockReset();
|
||||
});
|
||||
|
||||
it("does not import or start the Core cache bootstrap on the Portal surface", async () => {
|
||||
const portalBootstrap = await import("./entry-runtime-bootstrap-portal.server");
|
||||
|
||||
portalBootstrap.startEntryRuntimeServices();
|
||||
|
||||
expect(cacheBootstrap.evaluations).toBe(0);
|
||||
expect(cacheBootstrap.start).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("preserves the Core cache bootstrap at process entry", async () => {
|
||||
const coreBootstrap = await import("./entry-runtime-bootstrap-core.server");
|
||||
|
||||
expect(cacheBootstrap.evaluations).toBe(1);
|
||||
coreBootstrap.startEntryRuntimeServices();
|
||||
|
||||
expect(cacheBootstrap.start).toHaveBeenCalledOnce();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user