Skip to content

Commit

Permalink
75: the preceding commit broke one of the frontend tests - namely, th…
Browse files Browse the repository at this point in the history
…e test called `the user fills out the form on /example/new and submits it, and the backend is _mocked_ to respond that the form submission was accepted as valid and processed`; this commit restores that test to a PASSing state
  • Loading branch information
Kaloyan Marinov committed Sep 15, 2024
1 parent 34b1294 commit c2251b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@

"jest.rootPath": "frontend",
"jest.jestCommandLine": "npm run test --",
"jest.runMode": "on-demand"
"jest.runMode": "on-demand",

"prettier.singleQuote": false
}
2 changes: 1 addition & 1 deletion frontend/src/testHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class RequestHandlingFacilitator {
content_translation,
};

this.mockExamples = [...this.mockExamples, newExample];
this.mockExamples = [newExample, ...this.mockExamples];

return res.once(ctx.status(201), ctx.json(newExample));
};
Expand Down

2 comments on commit c2251b3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

badge-test-coverage

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

badge-test-coverage

Please sign in to comment.