diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a428d313..ea774ab2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,15 +29,12 @@ jobs:
- name: Build
run: yarn build
- - name: LHCI Benchmark
- run: yarn lhci
-
- - name: SonarCloud Scan
- uses: sonarsource/sonarcloud-github-action@master
- with:
- args: >
- -Dsonar.organization=${{ secrets.SONAR_ORG}}
- -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY}}
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ # - name: SonarCloud Scan
+ # uses: sonarsource/sonarcloud-github-action@master
+ # with:
+ # args: >
+ # -Dsonar.organization=${{ secrets.SONAR_ORG}}
+ # -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY}}
+ # env:
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
diff --git a/app/app.js b/app/app.js
index 9babf171..0107692e 100644
--- a/app/app.js
+++ b/app/app.js
@@ -8,7 +8,7 @@
// Needed for redux-saga es6 generator support
// Import all the third party stuff
import React from 'react';
-import ReactDOM from 'react-dom';
+import { createRoot } from 'react-dom/client';
import { Router } from 'react-router-dom';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
@@ -37,9 +37,9 @@ import { translationMessages } from './i18n';
const initialState = {};
const { store, persistor } = configureStore(initialState, history);
const MOUNT_NODE = document.getElementById('app');
-
+const root = createRoot(MOUNT_NODE);
const render = (messages) => {
- ReactDOM.render(
+ root.render(
Repository List
diff --git a/app/components/Clickable/tests/index.test.js b/app/components/Clickable/tests/index.test.js
index 7d2e5a5c..2c7afdea 100644
--- a/app/components/Clickable/tests/index.test.js
+++ b/app/components/Clickable/tests/index.test.js
@@ -5,7 +5,7 @@
*/
import React from 'react';
-import { fireEvent } from '@testing-library/dom';
+import { fireEvent } from '@testing-library/react';
import { renderWithIntl } from '@utils/testUtils';
import Clickable from '../index';
diff --git a/app/components/Header/tests/__snapshots__/index.test.js.snap b/app/components/Header/tests/__snapshots__/index.test.js.snap
index 95b62910..ddcccc70 100644
--- a/app/components/Header/tests/__snapshots__/index.test.js.snap
+++ b/app/components/Header/tests/__snapshots__/index.test.js.snap
@@ -4,17 +4,17 @@ exports[`
Wednesday Solutions
diff --git a/app/components/ProtectedRoute/tests/__snapshots__/index.test.js.snap b/app/components/ProtectedRoute/tests/__snapshots__/index.test.js.snap
index fb5ec80f..917a6331 100644
--- a/app/components/ProtectedRoute/tests/__snapshots__/index.test.js.snap
+++ b/app/components/ProtectedRoute/tests/__snapshots__/index.test.js.snap
@@ -4,20 +4,20 @@ exports[`
Go to Storybook
Get details of repositories
should render and match the snapshot 1`] = ` class="ant-input-group-addon" >
Search for a repository by entering it's name in the search box
diff --git a/app/components/RepoCard/tests/__snapshots__/index.test.js.snap b/app/components/RepoCard/tests/__snapshots__/index.test.js.snap
index 1a908bac..fbe8feee 100644
--- a/app/components/RepoCard/tests/__snapshots__/index.test.js.snap
+++ b/app/components/RepoCard/tests/__snapshots__/index.test.js.snap
@@ -4,26 +4,26 @@ exports[`
Repository name is unavailable
Repository full name unavaiable
Repository stars are unavaiable
diff --git a/app/components/T/tests/__snapshots__/index.test.js.snap b/app/components/T/tests/__snapshots__/index.test.js.snap
index 1cf235f3..0a8a031d 100644
--- a/app/components/T/tests/__snapshots__/index.test.js.snap
+++ b/app/components/T/tests/__snapshots__/index.test.js.snap
@@ -4,7 +4,7 @@ exports[`
Wednesday Solutions
diff --git a/app/containers/HomeContainer/tests/__snapshots__/index.test.js.snap b/app/containers/HomeContainer/tests/__snapshots__/index.test.js.snap
index 0cd67c3e..c63f190e 100644
--- a/app/containers/HomeContainer/tests/__snapshots__/index.test.js.snap
+++ b/app/containers/HomeContainer/tests/__snapshots__/index.test.js.snap
@@ -4,20 +4,20 @@ exports[`
Go to Storybook
Get details of repositories
tests should render and match the snapshot 1`] = ` class="ant-input-group-addon" >
Search for a repository by entering it's name in the search box
diff --git a/app/containers/LanguageProvider/tests/index.test.js b/app/containers/LanguageProvider/tests/index.test.js
index abf0a4e7..ced110df 100644
--- a/app/containers/LanguageProvider/tests/index.test.js
+++ b/app/containers/LanguageProvider/tests/index.test.js
@@ -1,5 +1,5 @@
import React from 'react';
-import { render } from 'react-testing-library';
+import { render } from '@testing-library/react';
import { FormattedMessage, defineMessages } from 'react-intl';
import { Provider } from 'react-redux';
import { browserHistory } from 'react-router-dom';
diff --git a/app/containers/NotFoundPage/tests/index.test.js b/app/containers/NotFoundPage/tests/index.test.js
index 7d676ee5..ccb90d82 100644
--- a/app/containers/NotFoundPage/tests/index.test.js
+++ b/app/containers/NotFoundPage/tests/index.test.js
@@ -1,5 +1,5 @@
import React from 'react';
-import { render } from 'react-testing-library';
+import { render } from '@testing-library/react';
import { IntlProvider } from 'react-intl';
import NotFoundPage from '../index';
diff --git a/app/utils/apiUtils.js b/app/utils/apiUtils.js
index 9cc5ca71..d808d986 100644
--- a/app/utils/apiUtils.js
+++ b/app/utils/apiUtils.js
@@ -1,4 +1,6 @@
import { create } from 'apisauce';
+import axios from 'axios';
+import axiosRetry from 'axios-retry';
import snakeCase from 'lodash/snakeCase';
import camelCase from 'lodash/camelCase';
import { mapKeysDeep } from './index';
@@ -20,10 +22,12 @@ export const generateApiClient = (type = 'github') => {
};
export const createApiClientWithTransForm = (baseURL) => {
- const api = create({
+ const customAxiosInstance = axios.create({
baseURL,
headers: { 'Content-Type': 'application/json' }
});
+ const api = create({ axiosInstance: customAxiosInstance });
+ axiosRetry(customAxiosInstance, { retries: 3 });
api.addResponseTransform((response) => {
const { ok, data } = response;
if (ok && data) {
diff --git a/jest.config.json b/jest.config.json
index c62ecaf3..af4cadba 100644
--- a/jest.config.json
+++ b/jest.config.json
@@ -42,13 +42,10 @@
"@app(.*)$": "