mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Refactor mergeConfig without utils.deepMerge (#2844)
* Adding failing test * Fixing #2587 default custom config persisting * Adding Concat keys and filter duplicates * Fixed value from CPE * update for review feedbacks * no deepMerge * only merge between plain objects * fix rename * always merge config by mergeConfig * extract function mergeDeepProperties * refactor mergeConfig with all keys, and add special logic for validateStatus * add test for resetting headers * add lots of tests and fix a bug * should not inherit `data` * use simple toString * revert #1845 Co-authored-by: David Tanner <david.tanner@lifeomic.com> Co-authored-by: Justin Beckwith <justin.beckwith@gmail.com>
This commit is contained in:
@@ -47,9 +47,17 @@ describe('utils::isX', function () {
|
||||
|
||||
it('should validate Object', function () {
|
||||
expect(utils.isObject({})).toEqual(true);
|
||||
expect(utils.isObject([])).toEqual(true);
|
||||
expect(utils.isObject(null)).toEqual(false);
|
||||
});
|
||||
|
||||
it('should validate plain Object', function () {
|
||||
expect(utils.isPlainObject({})).toEqual(true);
|
||||
expect(utils.isPlainObject([])).toEqual(false);
|
||||
expect(utils.isPlainObject(null)).toEqual(false);
|
||||
expect(utils.isPlainObject(Object.create({}))).toEqual(false);
|
||||
});
|
||||
|
||||
it('should validate Date', function () {
|
||||
expect(utils.isDate(new Date())).toEqual(true);
|
||||
expect(utils.isDate(Date.now())).toEqual(false);
|
||||
|
||||
Reference in New Issue
Block a user