MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / test_process_console_events_exception

Function test_process_console_events_exception

src/commands/console.rs:188–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187 #[test]
188 fn test_process_console_events_exception() {
189 let events = vec![json!({
190 "method": "Runtime.exceptionThrown",
191 "params": {
192 "exceptionDetails": {
193 "text": "TypeError",
194 "exception": {"description": "Cannot read property 'x' of null"}
195 },
196 "timestamp": 2000.0
197 }
198 })];
199 let out = process_console_events(&events, &[]);
200 assert_eq!(out.len(), 1);
201 assert_eq!(out[0]["type"], "exception");
202 assert_eq!(out[0]["text"], "Cannot read property 'x' of null");
203 }
204
205 #[test]
206 fn test_process_console_events_type_filter_excludes() {

Callers

nothing calls this directly

Calls 1

process_console_eventsFunction · 0.85

Tested by

no test coverage detected