(options)
| 4 | |
| 5 | module.exports = class MockProcess extends EventEmitter { |
| 6 | constructor(options) { |
| 7 | super(); |
| 8 | |
| 9 | options = options || {}; |
| 10 | |
| 11 | this.platform = 'MockOS'; |
| 12 | |
| 13 | const stdin = Object.assign( |
| 14 | new EventEmitter(), |
| 15 | { |
| 16 | isRaw: process.stdin.isRaw, |
| 17 | setRawMode: (flag) => { |
| 18 | stdin.isRaw = flag; |
| 19 | }, |
| 20 | }, |
| 21 | options.stdin || {} |
| 22 | ); |
| 23 | |
| 24 | Object.assign(this, options, { stdin }); |
| 25 | } |
| 26 | |
| 27 | getSignalListenerCounts() { |
| 28 | return { |
nothing calls this directly
no outgoing calls
no test coverage detected