Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
5
test/promisify/promisify.js
Normal file
5
test/promisify/promisify.js
Normal file
@@ -0,0 +1,5 @@
|
||||
const promisify = func => (...args) =>
|
||||
new Promise((resolve, reject) =>
|
||||
func(...args, (err, result) => (err ? reject(err) : resolve(result)))
|
||||
);
|
||||
module.exports = promisify;
|
||||
Reference in New Issue
Block a user