1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00
ladybird/Libraries/LibJS/Tests/copy-this-to-local.js

10 lines
215 B
JavaScript

test("copy this to a local", () => {
const foo = {
foo() {
let thisCopy = this;
thisCopy = "oops";
return this;
},
};
expect(foo.foo()).toBe(foo);
});