ladybird/Libraries/LibJS/Tests/add-values-to-primitive.js

6 lines
215 B
JavaScript

test("adding objects", () => {
expect([] + []).toBe("");
expect([] + {}).toBe("[object Object]");
expect({} + {}).toBe("[object Object][object Object]");
expect({} + []).toBe("[object Object]");
});