update nock
move nock to test function