use nock to test