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

Function test_extract_exported_function

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

Source from the content-addressed store, hash-verified

1199
1200 #[test]
1201 fn test_extract_exported_function() {
1202 let mut extractor = TypeScriptExtractor::new();
1203 let source = r#"
1204export function validateToken(token: string): boolean {
1205 return token.length > 0;
1206}
1207"#;
1208 let entities = extractor.extract(source, "test.ts");
1209
1210 assert_eq!(entities.len(), 1);
1211 assert_eq!(entities[0].name, "validateToken");
1212 assert!(entities[0].exported);
1213 }
1214
1215 #[test]
1216 fn test_extract_arrow_function() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected