Implement some unit tests for server/data.js