(node: Node, source?: string)
| 19 | |
| 20 | /** `node` is test code. `source` is the node's file, read when the caller has it. */ |
| 21 | export function isTestCode(node: Node, source?: string): boolean { |
| 22 | if (isTestFile(node.filePath)) return true; |
| 23 | if (node.qualifiedName && isTestScope(node.qualifiedName)) return true; |
| 24 | return node.language === 'rust' && source !== undefined && inCfgTestModule(source, node.startLine); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * `line` (1-based) is inside a module declared under a test `cfg`. The |
no test coverage detected