Testing Javascript Logic (and JetBrains IDE)