diff options
author | 2021-09-30 22:36:06 -0700 | |
---|---|---|
committer | 2021-09-30 22:36:06 -0700 | |
commit | 367f9c96740c4c4a9f717eb80b50e40bfc0e88af (patch) | |
tree | 0b13eec30a70e27969e656af166f3ed9067568ff /integration/snippets | |
parent | f9a906873e92f91104bfa869ed45eb9f5cbd39e1 (diff) | |
download | bun-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.js | 14 |
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); +} |