fix: Added test and fixed js syntax