add test-nice npm command
refactor requires in test js