File tree 2 files changed +4
-8
lines changed
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ abstract class Process {
147
147
* Child process that will clean up after itself if the parent goes away and can
148
148
* perform a handshake with the parent and ask it to relaunch.
149
149
*/
150
- class ChildProcess extends Process {
150
+ export class ChildProcess extends Process {
151
151
public logger = logger . named ( `child:${ process . pid } ` )
152
152
153
153
public constructor ( private readonly parentPid : number ) {
Original file line number Diff line number Diff line change 1
- import { ChildProcess } from "child_process"
2
- import { ParentProcess , isChild } from "../../../src/node/wrapper"
1
+ import { ChildProcess , ParentProcess , isChild } from "../../../src/node/wrapper"
3
2
4
3
describe ( "wrapper" , ( ) => {
5
4
describe ( "isChild" , ( ) => {
@@ -9,10 +8,7 @@ describe("wrapper", () => {
9
8
} )
10
9
} )
11
10
it ( "should return false for parent process" , ( ) => {
12
- const p = new ChildProcess ( )
13
- // our ChildProcess isn't exported
14
- // and shouldn't be for a test so surpressing TS error.
15
- // @ts -expect-error - see above
16
- expect ( isChild ( p ) ) . toBe ( false )
11
+ const childProc = new ChildProcess ( 1 )
12
+ expect ( isChild ( childProc ) ) . toBe ( true )
17
13
} )
18
14
} )
You can’t perform that action at this time.
0 commit comments