1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 18:54:57 +00:00
serenity/Libraries/LibJS/Tests/functions/function-missing-arg.js

10 lines
202 B
JavaScript

test("basic functionality", () => {
function foo(a, b) {
return a + b;
}
expect(foo()).toBeNaN();
expect(foo(1)).toBeNaN();
expect(foo(2, 3)).toBe(5);
expect(foo(2, 3, 4)).toBe(5);
});