Add unit tests for es helper functions