tested middleware js