({ nodes, allowScripts = null, ignoreScripts = false } = {})
| 5 | |
| 6 | // Build a minimal "arborist tree" fixture for the walker. |
| 7 | const arb = ({ nodes, allowScripts = null, ignoreScripts = false } = {}) => ({ |
| 8 | options: { allowScripts, ignoreScripts }, |
| 9 | actualTree: { |
| 10 | inventory: new Map(nodes.map((n, i) => [`node_modules/${n.name || `n${i}`}`, n])), |
| 11 | }, |
| 12 | }) |
| 13 | |
| 14 | const node = ({ |
| 15 | name = 'pkg', |
no test coverage detected