File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ abstract class Process {
147147 * Child process that will clean up after itself if the parent goes away and can
148148 * perform a handshake with the parent and ask it to relaunch.
149149 */
150- class ChildProcess extends Process {
150+ export class ChildProcess extends Process {
151151 public logger = logger . named ( `child:${ process . pid } ` )
152152
153153 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"
32
43describe ( "wrapper" , ( ) => {
54 describe ( "isChild" , ( ) => {
@@ -9,10 +8,7 @@ describe("wrapper", () => {
98 } )
109 } )
1110 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 )
1713 } )
1814} )
You can’t perform that action at this time.
0 commit comments