Bones not rotating as they are rotating in blender

I am having trouble setting rotations of bones. For some reason the bones are not being rotating correctly in three.js. In blender, when I rotate the arm around the y axis it rotates as expected. My model is in T pose and the model in kept over ZX plane. Rotating arm along Y axis would bring the arm in front or back. In threejs, when I change the Y rotation value the arm is rotated along the X axis (In the direction the arm is pointing).