Skip to content

Commit

Permalink
Fix HTTP request mock
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Dec 18, 2023
1 parent 60ad72f commit 54774a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __mocks__/@nextcloud/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const axios = jest.createMockFromModule('@nextcloud/axios')

const wsData = require('./activity_ws.json')

axios.get = function(url) {
axios.get = function (url) {
return new Promise((resolve, reject) => {
if (url === 'http://localhostundefined/ocs/v2.php/apps/activity/api/v2/activity/filter') {
if (url === 'http://localhost/ocs/v2.php/apps/activity/api/v2/activity/filter') {
resolve({ data: wsData })
} else {
// eslint-disable-next-line no-console
Expand Down

0 comments on commit 54774a7

Please sign in to comment.