Skip to content

Commit

Permalink
fix Testcafe promise bug (close #2255) (#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
LavrovArtem authored Mar 4, 2020
1 parent fcdde83 commit 4e94505
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 9 additions & 1 deletion test/server/script-processor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()); }'
}
]);
});
Expand Down

0 comments on commit 4e94505

Please sign in to comment.