Const
Assertion for testing if a function has a specific arity (number of parameters).
expect((a, b) => a + b, 'to have arity', 2); // passesexpect((a, b, c) => a + b + c, 'to have arity', 2); // fails Copy
expect((a, b) => a + b, 'to have arity', 2); // passesexpect((a, b, c) => a + b + c, 'to have arity', 2); // fails
Assertion for testing if a function has a specific arity (number of parameters).