|
4 | 4 | DispatcherConfigSchema, |
5 | 5 | DispatcherErrorCode, |
6 | 6 | DispatcherErrorResponseSchema, |
7 | | - DEFAULT_DISPATCHER_ROUTES, |
8 | 7 | type DispatcherRoute, |
9 | 8 | type DispatcherConfig, |
10 | 9 | } from './dispatcher.zod'; |
@@ -120,71 +119,9 @@ describe('DispatcherConfigSchema', () => { |
120 | 119 | }); |
121 | 120 | }); |
122 | 121 |
|
123 | | -describe('DEFAULT_DISPATCHER_ROUTES', () => { |
124 | | - it('should have routes for all protocol namespaces', () => { |
125 | | - expect(DEFAULT_DISPATCHER_ROUTES.length).toBeGreaterThanOrEqual(15); |
126 | | - }); |
127 | | - |
128 | | - it('should include required services', () => { |
129 | | - const services = DEFAULT_DISPATCHER_ROUTES.map(r => r.service); |
130 | | - expect(services).toContain('metadata'); |
131 | | - expect(services).toContain('data'); |
132 | | - expect(services).toContain('auth'); |
133 | | - }); |
134 | | - |
135 | | - it('should include the storage service', () => { |
136 | | - const services = DEFAULT_DISPATCHER_ROUTES.map(r => r.service); |
137 | | - expect(services).toContain('file-storage'); |
138 | | - // The feed route was retired (ADR-0052 §5 / #3180) — comments/activity are |
139 | | - // served by the generic data API on sys_comment / sys_activity. |
140 | | - expect(DEFAULT_DISPATCHER_ROUTES.find(r => r.prefix.includes('feed'))).toBeUndefined(); |
141 | | - }); |
142 | | - |
143 | | - it('should include optional services', () => { |
144 | | - const services = DEFAULT_DISPATCHER_ROUTES.map(r => r.service); |
145 | | - expect(services).toContain('ai'); |
146 | | - expect(services).toContain('i18n'); |
147 | | - expect(services).toContain('ui'); |
148 | | - expect(services).toContain('workflow'); |
149 | | - expect(services).toContain('realtime'); |
150 | | - expect(services).toContain('notification'); |
151 | | - expect(services).toContain('analytics'); |
152 | | - expect(services).toContain('automation'); |
153 | | - }); |
154 | | - |
155 | | - it('should have discovery as public route', () => { |
156 | | - const discovery = DEFAULT_DISPATCHER_ROUTES.find(r => r.prefix.includes('discovery')); |
157 | | - expect(discovery).toBeDefined(); |
158 | | - expect(discovery!.authRequired).toBe(false); |
159 | | - }); |
160 | | - |
161 | | - it('should mark required services with required criticality', () => { |
162 | | - const required = DEFAULT_DISPATCHER_ROUTES.filter(r => r.criticality === 'required'); |
163 | | - const requiredServices = required.map(r => r.service); |
164 | | - expect(requiredServices).toContain('metadata'); |
165 | | - expect(requiredServices).toContain('data'); |
166 | | - expect(requiredServices).toContain('auth'); |
167 | | - }); |
168 | | - |
169 | | - it('should have all prefixes starting with /', () => { |
170 | | - DEFAULT_DISPATCHER_ROUTES.forEach(route => { |
171 | | - expect(route.prefix).toMatch(/^\//); |
172 | | - }); |
173 | | - }); |
174 | | - |
175 | | - it('should be parseable by DispatcherConfigSchema', () => { |
176 | | - expect(() => DispatcherConfigSchema.parse({ |
177 | | - routes: DEFAULT_DISPATCHER_ROUTES, |
178 | | - })).not.toThrow(); |
179 | | - }); |
180 | | - |
181 | | - it('should include health route', () => { |
182 | | - const health = DEFAULT_DISPATCHER_ROUTES.find(r => r.prefix.includes('health')); |
183 | | - expect(health).toBeDefined(); |
184 | | - expect(health!.authRequired).toBe(false); |
185 | | - expect(health!.criticality).toBe('required'); |
186 | | - }); |
187 | | -}); |
| 122 | +// DEFAULT_DISPATCHER_ROUTES tests removed with the const (#3586) — the |
| 123 | +// dispatcher's real route surface is asserted by the route-ledger conformance |
| 124 | +// suite in packages/runtime. |
188 | 125 |
|
189 | 126 | // ============================================================================ |
190 | 127 | // Dispatcher Error Schemas |
|
0 commit comments