MCPcopy Create free account
hub / github.com/Doctave/dossier / documentation

Function documentation

dossier-ts/src/interface.rs:241–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239
240 #[test]
241 fn documentation() {
242 let code = indoc! {r#"
243 /**
244 * This is a test interface.
245 */
246 interface Test {
247 test: string;
248 }
249 "#};
250
251 let tree = init_parser().parse(code, None).unwrap();
252 let mut cursor = tree.root_node().walk();
253 walk_tree_to_interface(&mut cursor);
254
255 let symbol = parse(
256 &cursor.node(),
257 &mut ParserContext::new(Path::new("index.ts"), code),
258 )
259 .unwrap();
260
261 assert_eq!(
262 symbol.kind.as_interface().unwrap().documentation,
263 Some("This is a test interface.".to_owned())
264 );
265 }
266
267 #[test]
268 fn exported() {

Callers

nothing calls this directly

Calls 4

walk_tree_to_interfaceFunction · 0.85
init_parserFunction · 0.70
parseFunction · 0.70
parseMethod · 0.45

Tested by

no test coverage detected