From 404f5a8fe704e4542ffb9fe03afba9c0f75b2e3f Mon Sep 17 00:00:00 2001 From: FujiHaruka Date: Sun, 16 Dec 2018 00:49:08 +0900 Subject: [PATCH] Returns the promise in promisify.test.js --- test/promisify.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/promisify.test.js b/test/promisify.test.js index 820c73ba0..ce81aba4a 100644 --- a/test/promisify.test.js +++ b/test/promisify.test.js @@ -10,5 +10,9 @@ test('Returns a promise', () => { }); test('Runs the function provided', () => { const delay = promisify((d, cb) => setTimeout(cb, d)); - delay(200).then(() => expect(true).toBeTruthy()); + return delay(200).then(() => expect(true).toBeTruthy()); +}); +test('Returns a promise wrapped result', () => { + const return1 = promisify(cb => cb(null, 1)); + return return1().then(result => expect(result).toBe(1)); });