diff --git a/src/promisify.ts b/src/promisify.ts index 60cc662..3350ff9 100644 --- a/src/promisify.ts +++ b/src/promisify.ts @@ -24,6 +24,7 @@ export default function promisify(fn: LegacyCallback): AgentCallbackPromise { if (err) { reject(err); } else { + // @ts-ignore resolve(rtn); } } diff --git a/test/test.ts b/test/test.ts index 7c975de..5a5c808 100644 --- a/test/test.ts +++ b/test/test.ts @@ -250,6 +250,7 @@ describe('Agent (TypeScript)', () => { await req({ agent, ...info }); } catch (err) { gotError = true; +// @ts-ignore assert.equal(err.message, 'bad'); } @@ -277,6 +278,7 @@ describe('Agent (TypeScript)', () => { await req({ agent, ...info }); } catch (err) { gotError = true; +// @ts-ignore assert.equal(err.message, 'bad'); }