aboutsummaryrefslogtreecommitdiff
path: root/integration/snippets
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-30 22:36:06 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-30 22:36:06 -0700
commit367f9c96740c4c4a9f717eb80b50e40bfc0e88af (patch)
tree0b13eec30a70e27969e656af166f3ed9067568ff /integration/snippets
parentf9a906873e92f91104bfa869ed45eb9f5cbd39e1 (diff)
downloadbun-367f9c96740c4c4a9f717eb80b50e40bfc0e88af.tar.gz
bun-367f9c96740c4c4a9f717eb80b50e40bfc0e88af.tar.zst
bun-367f9c96740c4c4a9f717eb80b50e40bfc0e88af.zip
Add test that void doesn't delete call expressions
Diffstat (limited to 'integration/snippets')
-rw-r--r--integration/snippets/void-shouldnt-delete-call-expressions.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/integration/snippets/void-shouldnt-delete-call-expressions.js b/integration/snippets/void-shouldnt-delete-call-expressions.js
new file mode 100644
index 000000000..380fb591b
--- /dev/null
+++ b/integration/snippets/void-shouldnt-delete-call-expressions.js
@@ -0,0 +1,14 @@
+var was_called = false;
+function thisShouldBeCalled() {
+ was_called = true;
+}
+
+void thisShouldBeCalled();
+
+export function test() {
+ if (!was_called) {
+ throw new Error("Expected thisShouldBeCalled to be called");
+ }
+
+ return testDone(import.meta.url);
+}