fixing unit tests
fixing get pref unit tests. adding npm test