Skip to content

Commit

Permalink
test: actually write a test for this issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed May 12, 2021
1 parent 2e66c82 commit 332569e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
@@ -0,0 +1,10 @@
expect(
do {
var bar = "foo";
if (!bar) throw new Error(
"unreachable"
)
bar;
}
).toBe("foo");
expect(bar).toBe("foo");
@@ -0,0 +1,7 @@
var x = do {
var bar = "foo";
if (!bar) throw new Error(
"unreachable"
)
bar;
};
@@ -0,0 +1,7 @@
var bar;

var x = function () {
bar = "foo";
if (!bar) throw new Error("unreachable");
return bar;
}();

0 comments on commit 332569e

Please sign in to comment.