build(deps-dev): bump @rollup/plugin-typescript
[poolifier.git] / tests / worker / abstract-worker.test.mjs
index e15f60a5445c16698874815862bc92ff991a471b..575e065132b889ad4b96ba7f1440ab5db23b2759 100644 (file)
@@ -60,9 +60,6 @@ describe('Abstract worker test suite', () => {
     expect(() => new ThreadWorker(() => {}, { killHandler: 0 })).toThrowError(
       new TypeError('killHandler option is not a function')
     )
-    expect(() => new ThreadWorker(() => {}, { async: true })).toThrowError(
-      new TypeError('async option is deprecated')
-    )
   })
 
   it('Verify that worker options are set at worker creation', () => {
@@ -179,7 +176,7 @@ describe('Abstract worker test suite', () => {
   it('Verify that async kill handler is called when worker is killed', () => {
     const killHandlerStub = stub().returns()
     const worker = new ClusterWorker(() => {}, {
-      killHandler: async () => Promise.resolve(killHandlerStub())
+      killHandler: async () => await Promise.resolve(killHandlerStub())
     })
     worker.isMain = false
     worker.handleKillMessage()