diff --git a/package.json b/package.json index 0034648d5..1308684f4 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "brotli": "^1.3.1", "crypto-md5": "^1.0.0", "css": "2.2.3", - "esotope-hammerhead": "^0.5.1", + "esotope-hammerhead": "0.5.3", "iconv-lite": "0.4.11", "lodash": "^4.17.13", "lru-cache": "2.6.3", diff --git a/test/server/script-processor-test.js b/test/server/script-processor-test.js index 672387b2b..437249027 100644 --- a/test/server/script-processor-test.js +++ b/test/server/script-processor-test.js @@ -931,7 +931,7 @@ describe('Script processor', () => { }, { src: 'const y = { async [x] () { await (0); } }[x]', // GH-1862 - expected: 'const y = __get$({ async [x] () { await (0); } }, x)' + expected: 'const y = __get$({ async [x] () { await 0; } }, x)' }, { src: 'new X(() => {(async () => { b[c] = d; })(); })', // GH-2002 @@ -944,6 +944,14 @@ describe('Script processor', () => { { src: 'd[f]=async function(){await(x={qwe:123},y(x))}', // GH-2072 expected: '__set$(d,f,async function(){await (x={qwe:123},y(x));})' + }, + { + src: 'async function f() { result[type] = (await result).clone(); }', // GH-2255 + expected: 'async function f() { __set$(result,type,(await result).clone()); }' + }, + { + src: 'async function f() { result[type] = await result.clone(); }', // GH-2255 + expected: 'async function f() { __set$(result,type,await result.clone()); }' } ]); });