aboutsummaryrefslogtreecommitdiff
path: root/test/snippets/void-shouldnt-delete-call-expressions.js
blob: 380fb591b828c53fda04b96b21ac7cf476d0d450 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
}