Skip to content

Commit

Permalink
fix: remove axios import (#2653)
Browse files Browse the repository at this point in the history
* fix: remove axios import

* remove axios dep
  • Loading branch information
michael-siek committed Nov 19, 2020
1 parent ba174bd commit 2d20cde
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 55 deletions.
4 changes: 1 addition & 3 deletions lib/core/imports/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @deprecated (axios)
import axios from 'axios';
import { CssSelectorParser } from 'css-selector-parser';
import doT from '@deque/dot';
import emojiRegexText from 'emoji-regex';
Expand Down Expand Up @@ -38,4 +36,4 @@ if (window.Uint32Array) {
* @namespace imports
* @memberof axe
*/
export { axios, CssSelectorParser, doT, emojiRegexText, memoize };
export { CssSelectorParser, doT, emojiRegexText, memoize };
35 changes: 0 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"@babel/preset-env": "^7.5.4",
"@deque/dot": "^1.1.5",
"aria-query": "^3.0.0",
"axios": "^0.19.0",
"babelify": "^10.0.0",
"blanket": "~1.2.3",
"browserify": "^16.2.3",
Expand Down
4 changes: 0 additions & 4 deletions test/integration/full/umd/umd-module-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ describe('UMD module.export', function() {
);
});

it('should ensure axe source includes axios', function() {
assert.isTrue(axe.source.includes(axe.imports.axios.toString()));
});

it('should include doT', function() {
var doT = axe.imports.doT;
assert(doT, 'doT is registered on axe.imports');
Expand Down
12 changes: 0 additions & 12 deletions test/integration/full/umd/umd-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,4 @@ describe('UMD window', function() {
it('should ensure axe has prototype chained keys', function() {
assert.hasAnyKeys(axe, ['utils', 'commons', 'core']);
});

it('should expose not expose axios as a property of window', function() {
assert.notProperty(window, 'axios');
});

it('should ensure axios is a mounted to axe.imports', function() {
assert.hasAnyKeys(axe.imports, ['axios']);
});

it('should ensure axios has prototype chained keys', function() {
assert.hasAnyKeys(axe.imports.axios, ['get', 'request', 'options', 'post']);
});
});

0 comments on commit 2d20cde

Please sign in to comment.