Skip to content

Commit

Permalink
fix(admin-ui): replace XMLHttpRequest with xhr2 in jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jv18creator committed Jul 28, 2023
1 parent a5e1aed commit fcef9db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions admin-ui/__tests__/setup-tests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
global.XMLHttpRequest = require('xhr2')
import * as dotenv from 'dotenv';

dotenv.config({ path: '.env.test' });
Expand Down
3 changes: 2 additions & 1 deletion admin-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
"webpack": "^5.77.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.13.2"
"webpack-dev-server": "^4.13.2",
"xhr2": "^0.2.1"
},
"dependencies": {
"@babel/polyfill": "^7.4.4",
Expand Down

0 comments on commit fcef9db

Please sign in to comment.