(args = [], options = {})
| 136 | } |
| 137 | |
| 138 | function runProcess(args = [], options = {}) { |
| 139 | const env = { |
| 140 | ...process.env, |
| 141 | ...(options.env || {}) |
| 142 | }; |
| 143 | |
| 144 | return spawnSync('node', [SCRIPT, ...args], { |
| 145 | cwd: options.cwd || path.join(__dirname, '..', '..'), |
| 146 | env, |
| 147 | encoding: 'utf8', |
| 148 | stdio: ['pipe', 'pipe', 'pipe'], |
| 149 | timeout: 10000 |
| 150 | }); |
| 151 | } |
| 152 | |
| 153 | function test(name, fn) { |
| 154 | try { |