Newer
Older
minerva / Userland / Libraries / LibJS / Tests / copy-this-to-local.js
@minerva minerva on 13 Jul 215 bytes Initial commit
test("copy this to a local", () => {
    const foo = {
        foo() {
            let thisCopy = this;
            thisCopy = "oops";
            return this;
        },
    };
    expect(foo.foo()).toBe(foo);
});