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

Function test_extract_arrow_function

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

Source from the content-addressed store, hash-verified

1214
1215 #[test]
1216 fn test_extract_arrow_function() {
1217 let mut extractor = TypeScriptExtractor::new();
1218 let source = r#"
1219const processData = (data: Data[]): Result => {
1220 return data.map(d => transform(d));
1221};
1222"#;
1223 let entities = extractor.extract(source, "test.ts");
1224
1225 assert_eq!(entities.len(), 1);
1226 assert_eq!(entities[0].name, "processData");
1227 assert_eq!(entities[0].kind, EntityKind::Function);
1228 }
1229
1230 #[test]
1231 fn test_extract_const() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected