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

Function test_extract_exported_function

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

Source from the content-addressed store, hash-verified

1244
1245 #[test]
1246 fn test_extract_exported_function() {
1247 let mut extractor = TypeScriptExtractor::new();
1248 let source = r#"
1249export function validateToken(token: string): boolean {
1250 return token.length > 0;
1251}
1252"#;
1253 let entities = extractor.extract(source, "test.ts");
1254
1255 assert_eq!(entities.len(), 1);
1256 assert_eq!(entities[0].name, "validateToken");
1257 assert!(entities[0].exported);
1258 }
1259
1260 #[test]
1261 fn test_extract_arrow_function() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected