Skip to content

Commit

Permalink
Fix broken wcif zip fetching mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Billing committed Oct 1, 2020
1 parent c966ecd commit 3cc098f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
node_js: 10
script:
- cd tnoodle-ui
- echo $coveralls_repo_token
- npm install
- npm test -- --coverage
after_script:
Expand Down
9 changes: 5 additions & 4 deletions tnoodle-ui/src/test/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ beforeEach(() => {
);

jest.spyOn(tnoodleApi, "fetchZip").mockImplementation((...payload) => {
wcif = payload[0];
mbld = payload[1];
password = payload[2];
translations = payload[3];
// payload[0] is the socket client, ignore it
wcif = payload[1];
mbld = payload[2];
password = payload[3];
translations = payload[4];

return Promise.resolve(new Blob([]));
});
Expand Down

0 comments on commit 3cc098f

Please sign in to comment.