()
| 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() { |
nothing calls this directly
no test coverage detected