Skip to content

Commit

Permalink
fix: support export default
Browse files Browse the repository at this point in the history
  • Loading branch information
gxcsoccer committed Mar 5, 2020
1 parent bdbd055 commit 0245aa7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/index.js
Expand Up @@ -68,10 +68,6 @@ class ClusterTsServerProcess extends Base {
detached: true,
stdio: 'inherit',
execArgv: [],
env: {
...process.env,
NODE_OPTIONS: '--max_old_space_size=4096',
},
});
await awaitEvent(proc, 'message');
proc.disconnect();
Expand All @@ -92,6 +88,10 @@ class ClusterTsServerProcess extends Base {
}
this._client.write(serverRequest);
}

static get default() {
return ClusterTsServerProcess;
}
}

module.exports = ClusterTsServerProcess;
4 changes: 4 additions & 0 deletions test/index.test.js
Expand Up @@ -140,4 +140,8 @@ describe('test/index.test.js', () => {

assert(fs.existsSync(logFile));
});

it('should support export default', () => {
assert(ClusterTsServerProcess === ClusterTsServerProcess.default);
});
});

0 comments on commit 0245aa7

Please sign in to comment.