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

Function test_extract_arrow_function

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

Source from the content-addressed store, hash-verified

1259
1260 #[test]
1261 fn test_extract_arrow_function() {
1262 let mut extractor = TypeScriptExtractor::new();
1263 let source = r#"
1264const processData = (data: Data[]): Result => {
1265 return data.map(d => transform(d));
1266};
1267"#;
1268 let entities = extractor.extract(source, "test.ts");
1269
1270 assert_eq!(entities.len(), 1);
1271 assert_eq!(entities[0].name, "processData");
1272 assert_eq!(entities[0].kind, EntityKind::Function);
1273 }
1274
1275 #[test]
1276 fn test_extract_const() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected