diff --git a/tests/while with inner break/case-result.js b/tests/while with inner break/case-result.js new file mode 100644 index 0000000..c41fcfb --- /dev/null +++ b/tests/while with inner break/case-result.js @@ -0,0 +1 @@ +expect(await f()).toBe(1); diff --git a/tests/while with inner break/input.js b/tests/while with inner break/input.js new file mode 100644 index 0000000..d3bc56f --- /dev/null +++ b/tests/while with inner break/input.js @@ -0,0 +1,13 @@ +async function() { + let result = 0; + while (true) { + try { + await null; + result = 1; + break; + } + catch {} + result = 2; + } + return result; +} \ No newline at end of file