Skip to content

Commit

Permalink
fixes js tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Oct 3, 2024
1 parent 31360da commit 43f1e96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/components/LogViewer/EventSource.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { createRouter, createWebHistory } from "vue-router";
import { default as Component } from "./EventSource.vue";
import LogViewer from "@/components/LogViewer/LogViewer.vue";
import { Container } from "@/models/Container";
import { Level } from "@/models/LogEntry";

vi.mock("@/stores/config", () => ({
__esModule: true,
Expand Down Expand Up @@ -82,6 +83,7 @@ describe("<ContainerEventSource />", () => {
containers: computed(() => [{ id: "abc", image: "test:v123", host: "localhost" }]),
streamConfig: reactive({ stdout: true, stderr: true }),
hasComplexLogs: ref(false),
levels: new Set<Level>(["info"]),
},
},
},
Expand All @@ -97,7 +99,7 @@ describe("<ContainerEventSource />", () => {
});
}

const sourceUrl = "/api/hosts/localhost/containers/abc/logs/stream?stdout=1&stderr=1";
const sourceUrl = "/api/hosts/localhost/containers/abc/logs/stream?stdout=1&stderr=1&levels=info";

test("renders loading correctly", async () => {
const wrapper = createLogEventSource();
Expand Down

0 comments on commit 43f1e96

Please sign in to comment.