|
5 | 5 | import * as fs from 'fs'; |
6 | 6 | import * as p from 'path'; |
7 | 7 |
|
8 | | -import {ExitEvent, StderrEvent, StdoutEvent, SyncProcess} from './index'; |
| 8 | +import {ExitEvent, StderrEvent, StdoutEvent, SyncChildProcess} from './index'; |
9 | 9 |
|
10 | | -describe('SyncProcess', () => { |
| 10 | +describe('SyncChildProcess', () => { |
11 | 11 | describe('stdio', () => { |
12 | 12 | it('emits stdout', () => { |
13 | 13 | withJSProcess('console.log("hello, world!");', node => { |
@@ -70,7 +70,7 @@ describe('SyncProcess', () => { |
70 | 70 |
|
71 | 71 | it('passes options to the subprocess', () => { |
72 | 72 | withJSFile('console.log(process.env.SYNC_PROCESS_TEST);', file => { |
73 | | - const node = new SyncProcess(process.argv0, [file], { |
| 73 | + const node = new SyncChildProcess(process.argv0, [file], { |
74 | 74 | env: {...process.env, SYNC_PROCESS_TEST: 'abcdef'}, |
75 | 75 | }); |
76 | 76 | expectStdout(node.next(), 'abcdef\n'); |
@@ -134,15 +134,15 @@ function expectExit( |
134 | 134 | } |
135 | 135 |
|
136 | 136 | /** |
137 | | - * Starts a `SyncProcess` running a JS file with the given `contents` and passes |
138 | | - * it to `callback`. |
| 137 | + * Starts a `SyncChildProcess` running a JS file with the given `contents` and |
| 138 | + * passes it to `callback`. |
139 | 139 | */ |
140 | 140 | function withJSProcess( |
141 | 141 | contents: string, |
142 | | - callback: (process: SyncProcess) => void, |
| 142 | + callback: (process: SyncChildProcess) => void, |
143 | 143 | ): void { |
144 | 144 | return withJSFile(contents, file => { |
145 | | - const node = new SyncProcess(process.argv0, [file]); |
| 145 | + const node = new SyncChildProcess(process.argv0, [file]); |
146 | 146 |
|
147 | 147 | try { |
148 | 148 | callback(node); |
|
0 commit comments