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

Function test_extract_exported_function

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

Source from the content-addressed store, hash-verified

1272
1273 #[test]
1274 fn test_extract_exported_function() {
1275 let mut extractor = TypeScriptExtractor::new();
1276 let source = r#"
1277export function validateToken(token: string): boolean {
1278 return token.length > 0;
1279}
1280"#;
1281 let entities = extractor.extract(source, "test.ts");
1282
1283 assert_eq!(entities.len(), 1);
1284 assert_eq!(entities[0].name, "validateToken");
1285 assert!(entities[0].exported);
1286 }
1287
1288 #[test]
1289 fn test_extract_arrow_function() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected