(name)
| 1569 | } |
| 1570 | |
| 1571 | resolve (name) { |
| 1572 | /* istanbul ignore next - should be impossible, |
| 1573 | * but I keep doing this mistake in tests */ |
| 1574 | debug(() => { |
| 1575 | if (typeof name !== 'string' || !name) { |
| 1576 | throw new Error('non-string passed to Node.resolve') |
| 1577 | } |
| 1578 | }) |
| 1579 | const mine = this.children.get(name) |
| 1580 | if (mine) { |
| 1581 | return mine |
| 1582 | } |
| 1583 | const resolveParent = this.resolveParent |
| 1584 | if (resolveParent) { |
| 1585 | return resolveParent.resolve(name) |
| 1586 | } |
| 1587 | return null |
| 1588 | } |
| 1589 | |
| 1590 | inNodeModules () { |
| 1591 | const rp = this.realpath |
no test coverage detected