Skip to content

Commit

Permalink
fixes js tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Jan 3, 2025
1 parent 5ad0747 commit 9480fbb
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 4 deletions.
42 changes: 39 additions & 3 deletions assets/components/FuzzySearchModal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,45 @@ function createFuzzySearchModal() {
initialState: {
container: {
containers: [
new Container("123", new Date(), "image", "test", "command", "host", {}, "running", []),
new Container("345", new Date(), "image", "foo bar", "command", "host", {}, "running", []),
new Container("567", new Date(), "image", "baz", "command", "host", {}, "running", []),
new Container(
"123",
new Date(),
new Date(),
new Date(),
"image",
"test",
"command",
"host",
{},
"running",
[],
),
new Container(
"345",
new Date(),
new Date(),
new Date(),
"image",
"foo bar",
"command",
"host",
{},
"running",
[],
),
new Container(
"567",
new Date(),
new Date(),
new Date(),
"image",
"baz",
"command",
"host",
{},
"running",
[],
),
],
},
},
Expand Down
14 changes: 13 additions & 1 deletion assets/components/LogViewer/EventSource.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,19 @@ describe("<ContainerEventSource />", () => {
},
props: {
streamSource: useContainerStream,
entity: new Container("abc", new Date(), "image", "name", "command", "localhost", {}, "created", []),
entity: new Container(
"abc",
new Date(), // created
new Date(), // started
new Date(), // finished
"image",
"name",
"command",
"localhost",
{},
"created",
[],
),
},
});
}
Expand Down

0 comments on commit 9480fbb

Please sign in to comment.