mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Node6: Remove parentheses around the body of async arrow functions (#942)
This commit is contained in:
@@ -70,4 +70,10 @@ describe('TransformAsyncFunctions', function() {
|
||||
expect(output instanceof Promise).toBe(true);
|
||||
output.then(result => expect(result).toBe(123)).then(done);
|
||||
});
|
||||
it('should work paren around arrow function', function(done) {
|
||||
const input = `(async x => ( 123))()`;
|
||||
const output = eval(transformAsyncFunctions(input));
|
||||
expect(output instanceof Promise).toBe(true);
|
||||
output.then(result => expect(result).toBe(123)).then(done);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user