MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_extract_arrow_function

Function test_extract_arrow_function

atomic-semantic/src/parser.rs:1289–1301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1287
1288 #[test]
1289 fn test_extract_arrow_function() {
1290 let mut extractor = TypeScriptExtractor::new();
1291 let source = r#"
1292const processData = (data: Data[]): Result => {
1293 return data.map(d => transform(d));
1294};
1295"#;
1296 let entities = extractor.extract(source, "test.ts");
1297
1298 assert_eq!(entities.len(), 1);
1299 assert_eq!(entities[0].name, "processData");
1300 assert_eq!(entities[0].kind, EntityKind::Function);
1301 }
1302
1303 #[test]
1304 fn test_extract_const() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected