Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaotian committed Apr 23, 2024
1 parent 0cf5bd7 commit e33f1fa
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions tests/src/tests/interceptors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,55 +294,6 @@ describe('interceptors', function () {
assert.equal(response?.data, 'get13');
});

// it('should remove async interceptor before making request and execute synchronously', function (done) {
// let asyncFlag = false;
// const asyncIntercept = axios.interceptors.request.use(
// function (config) {
// config.headers.async = 'async it!';
// return config;
// },
// null,
// { synchronous: false }
// );

// const syncIntercept = axios.interceptors.request.use(
// function (config) {
// config.headers.sync = 'hello world';
// expect(asyncFlag).toBe(false);
// return config;
// },
// null,
// { synchronous: true }
// );

// axios.interceptors.request.eject(asyncIntercept);

// axios('/foo');
// asyncFlag = true;

// getAjaxRequest().then(function (request) {
// expect(request.requestHeaders.async).toBeUndefined();
// expect(request.requestHeaders.sync).toBe('hello world');
// done();
// });
// });

// it('should execute interceptors before transformers', async function () {
// axios.interceptors.request.use(function (config) {
// config.data.baz = 'qux';
// return config;
// });

// const {config: request} = await axios.post('/post', {
// foo: 'bar',
// });

// getAjaxRequest().then(function (request) {
// expect(request.params).toEqual('{"foo":"bar","baz":"qux"}');
// ();
// });
// });

it('should modify base URL in request interceptor', async function () {
const instance = xior.create({
baseURL: 'http://test.com/',
Expand Down

0 comments on commit e33f1fa

Please sign in to comment.