Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ module.exports = createConfig('jest', {
setupFilesAfterEnv: [
'<rootDir>/src/setupTest.js',
],
coveragePathIgnorePatterns: [
// Test helpers only ever imported by tests.
'src/tests/',
],
});
199 changes: 30 additions & 169 deletions package-lock.json

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

12 changes: 2 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,20 @@
"@openedx/frontend-plugin-framework": "^1.7.0",
"@openedx/paragon": "^23.4.5",
"@pact-foundation/pact": "^11.0.2",
"@redux-devtools/extension": "3.3.0",
"@tanstack/react-query": "^5.103.2",
"classnames": "2.5.1",
"core-js": "3.48.0",
"history": "5.3.0",
"lodash.camelcase": "4.3.0",
"lodash.get": "4.4.2",
"lodash.pick": "4.4.0",
"lodash.snakecase": "4.1.1",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-helmet": "6.1.0",
"react-redux": "7.2.9",
"react-router": "6.30.3",
"react-router-dom": "6.30.3",
"redux": "4.2.1",
"redux-logger": "3.0.6",
"redux-saga": "1.4.2",
"redux-thunk": "2.4.2",
"regenerator-runtime": "0.14.1",
"reselect": "5.1.1",
"universal-cookie": "4.0.4"
},
"devDependencies": {
Expand All @@ -73,7 +66,6 @@
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "14.3.1",
"glob": "11.1.0",
"jest-environment-jsdom": "^30.3.0",
"redux-mock-store": "1.5.5"
"jest-environment-jsdom": "^30.3.0"
}
}
33 changes: 0 additions & 33 deletions src/data/configureStore.js

This file was deleted.

15 changes: 15 additions & 0 deletions src/data/queryOptions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Retry policy for the app's queries.
*
* A 4xx will not get better by asking again, so it fails at once; anything else (network trouble,
* a 5xx) gets react-query's usual three attempts. This lives on each query rather than on the
* QueryClient because the frontend-base shell will provide the client, with library defaults.
*/
export const isClientError = (error) => {
const status = error?.response?.status;
return status !== undefined && status >= 400 && status < 500;
};

export const retryUnlessClientError = (failureCount, error) => (
!isClientError(error) && failureCount < 3
);
Loading
Loading