fix package.json
improve interaction between test and preview tasks