I have several functions I would like to test with Jest. All functions are functions that return functions.
A simple example:
export function csl(foo) {
return function(bar) {
return(bar)
};
}
now I want to test if the input = the return is. I try it with:
expect(() => csl("foo")).toBe("foo") // = received: [Function anonymous]
expect(csl("foo")).toBe("foo") // = received: undefined
How I can test these functions?