mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
Fix UnifiedAgents test missing Router wrapper
UnifiedAgents calls useNavigate() which requires a Router context. The test was rendering the component without one, breaking CI.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||
import { render, fireEvent, screen, waitFor, cleanup, within } from '@solidjs/testing-library';
|
||||
import { createStore } from 'solid-js/store';
|
||||
import { Router, Route } from '@solidjs/router';
|
||||
import { UnifiedAgents } from '../UnifiedAgents';
|
||||
import type { Host, DockerHost, KubernetesCluster, RemovedDockerHost, RemovedKubernetesCluster } from '@/types/api';
|
||||
|
||||
@@ -155,7 +156,11 @@ const setupComponent = (
|
||||
activeAlerts: [],
|
||||
};
|
||||
|
||||
return render(() => <UnifiedAgents />);
|
||||
return render(() => (
|
||||
<Router>
|
||||
<Route path="/" component={() => <UnifiedAgents />} />
|
||||
</Router>
|
||||
));
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user