summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Tests/operators/void-basic.js
blob: a23becae96e160b4497b8d5a9eb45f1f6feae428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
test("basic functionality", () => {
    expect(void "").toBeUndefined();
    expect(void "foo").toBeUndefined();
    expect(void 1).toBeUndefined();
    expect(void 42).toBeUndefined();
    expect(void true).toBeUndefined();
    expect(void false).toBeUndefined();
    expect(void null).toBeUndefined();
    expect(void undefined).toBeUndefined();
    expect(void function () {}).toBeUndefined();
    expect(void (() => {})).toBeUndefined();
    expect(void (() => "hello friends")()).toBeUndefined();
    expect((() => void "hello friends")()).toBeUndefined();
});