Function
mockGetInstallScripts
(t, isNodeGypResult = () => false)
Source from the content-addressed store, hash-verified
| 1 | const t = require('tap') |
| 2 | |
| 3 | const mockGetInstallScripts = (t, isNodeGypResult = () => false) => |
| 4 | t.mock('../lib/install-scripts.js', { |
| 5 | '@npmcli/node-gyp': { |
| 6 | isNodeGypPackage: async (path) => { |
| 7 | if (typeof isNodeGypResult === 'function') { |
| 8 | return isNodeGypResult(path) |
| 9 | } |
| 10 | return !!isNodeGypResult |
| 11 | }, |
| 12 | }, |
| 13 | }) |
| 14 | |
| 15 | const node = ({ |
| 16 | scripts = {}, |
Tested by
no test coverage detected