#unit-test javascript functions
1 messages · Page 1 of 1 (latest)
Hi There!
Thanks for reaching out to us. One of our engineer will be with you shortly.
If you are stuck with an issue/error, please help us with following information.
- Which version of Appsmith are you on?
- Provide screenshots/screen recordings of the original error/code snippet.
- Add details about your use case and provide steps to reproduce the issue, if
possible.
Hi! Can you elaborate a bit on the use case here?
In a large, complex application, we need to write a lot of javascript functions that contain business logic. It would be great if we could write unit tests for these functions.
Example:
let's say we have a function with some logic
someFunction:(a,b)=>{return a+b}
it would be nice to be able to specify a unit test for that function like
test('add 1 + 2 to equal 3', () => {
expect(someFunction(1,2)).toBe(3)})