(dir = __dirname)
| 854 | } |
| 855 | |
| 856 | function requireNoPackageJSONAbove(dir = __dirname) { |
| 857 | let possiblePackage = path.join(dir, '..', 'package.json'); |
| 858 | let lastPackage = null; |
| 859 | while (possiblePackage !== lastPackage) { |
| 860 | if (fs.existsSync(possiblePackage)) { |
| 861 | assert.fail( |
| 862 | 'This test shouldn\'t load properties from a package.json above ' + |
| 863 | `its file location. Found package.json at ${possiblePackage}.`); |
| 864 | } |
| 865 | lastPackage = possiblePackage; |
| 866 | possiblePackage = path.join(possiblePackage, '..', '..', 'package.json'); |
| 867 | } |
| 868 | } |
| 869 | |
| 870 | function spawnPromisified(...args) { |
| 871 | const { spawn } = require('child_process'); |
nothing calls this directly
no test coverage detected
searching dependent graphs…