split test.js to app/lib