unexpected-mitm Plugin for Unexpected that allows you to mock out http(s) traffic via mitm, but using a declarative syntax. Read the documentation.