summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Tests/variable-undefined.js
blob: 4399d5332d031152bb5e889baf59645f10363989 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
test("basic functionality", () => {
    function foo(a) {
        return a;
    }

    var x = undefined;
    expect(x).toBeUndefined();
    expect(foo(x)).toBeUndefined();

    var o = {};
    o.x = x;
    expect(o.x).toBeUndefined();
    expect(o.x).toBe(x);
});