Axios interceptor request unit test for custom header

Viewed 102

I have an Axios request interceptor like so:

instance.interceptors.request.use(
  config => {
    config.headers.customHeader = uuidv4();
    return config;
  },
  error => Promise.reject(error)
);

I am struggling to come up with a way to unit test the custom header attached to each request.

0 Answers
Related