fix command for "npm test" and some tests issues