Skip to content

Commit

Permalink
Redux 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qmonmert committed Dec 5, 2023
1 parent 33d9f9c commit 1605255
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions generators/react/resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@fortawesome/fontawesome-svg-core": "6.5.1",
"@fortawesome/free-solid-svg-icons": "6.5.1",
"@fortawesome/react-fontawesome": "0.2.0",
"@reduxjs/toolkit": "1.9.7",
"@reduxjs/toolkit": "2.0.1",
"axios": "1.6.2",
"bootstrap": "5.3.2",
"bootswatch": "5.3.2",
Expand All @@ -14,14 +14,14 @@
"react-hook-form": "7.48.2",
"react-jhipster": "0.25.3",
"react-loadable": "5.5.0",
"react-redux": "8.1.3",
"react-redux": "9.0.1",
"react-redux-loading-bar": "5.0.5",
"react-router-dom": "6.20.1",
"react-toastify": "9.1.3",
"react-transition-group": "4.4.5",
"reactstrap": "9.2.1",
"redux": "4.2.1",
"redux-thunk": "2.4.2",
"redux": "5.0.0",
"redux-thunk": "3.1.0",
"sonar-scanner": "3.1.0",
"tslib": "2.6.2",
"uuid": "9.0.1"
Expand All @@ -34,7 +34,7 @@
"@types/node": "18.19.2",
"@types/react": "18.2.42",
"@types/react-dom": "18.2.17",
"@types/react-redux": "7.1.31",
"@types/react-redux": "7.1.32",
"@types/redux": "3.6.31",
"@types/webpack-env": "1.18.4",
"@typescript-eslint/eslint-plugin": "6.13.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ describe('Entities reducer tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({});
axios.get = sinon.stub().returns(Promise.resolve(resolvedObject));
axios.post = sinon.stub().returns(Promise.resolve(resolvedObject));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('Activate reducer tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({});
axios.get = sinon.stub().returns(Promise.resolve(resolvedObject));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('Password reducer tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({});
axios.post = sinon.stub().returns(Promise.resolve(resolvedObject));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('Creating account tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({});
axios.post = sinon.stub().returns(Promise.resolve(resolvedObject));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('Settings reducer tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
<%_ if (enableTranslation) { _%>
store = mockStore({ authentication: { account: { langKey: '<%= nativeLanguage %>' } } });
<%_ } else { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ describe('Administration reducer tests', () => {
const resolvedObject = { value: 'whatever' };
<%_ if (applicationTypeGateway && serviceDiscoveryAny || withAdminUi) { _%>
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({});
axios.get = sinon.stub().returns(Promise.resolve(resolvedObject));
axios.post = sinon.stub().returns(Promise.resolve(resolvedObject));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('User management reducer tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({});
axios.get = sinon.stub().returns(Promise.resolve(resolvedObject));
axios.put = sinon.stub().returns(Promise.resolve(resolvedObject));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('private-route component', () => {
});
<%_ } _%>

const mockStore = configureStore([thunk]);
const mockStore = configureStore();
const wrapper = (Elem: JSX.Element, authentication) => {
const store = mockStore({ authentication });
return render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('Profile reducer tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({});
axios.get = sinon.stub().returns(Promise.resolve(resolvedObject));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('Authentication reducer tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
<%_ if (enableTranslation) { _%>
store = mockStore({ authentication: { account: { langKey: '<%= nativeLanguage %>' } }, locale: { loadedLocales: ['<%= nativeLanguage %>'] } });
<%_ } else { _%>
Expand Down Expand Up @@ -305,7 +305,7 @@ describe('Authentication reducer tests', () => {
describe('clearAuthToken', () => {
let store;
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({ authentication: { account: { langKey: 'en' } } });
});
it('clears the session token on clearAuthToken', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Locale reducer tests', () => {
describe('with default language loaded', () => {
let store;
beforeEach(() => {
store = configureStore([thunk])({ locale: { loadedLocales: [defaultLocale], loadedKeys: [] } });
store = configureStore()({ locale: { loadedLocales: [defaultLocale], loadedKeys: [] } });
axios.get = sinon.stub().returns(Promise.resolve({ key: 'value' }));
});

Expand All @@ -73,7 +73,7 @@ describe('Locale reducer tests', () => {
describe('with no language loaded', () => {
let store;
beforeEach(() => {
store = configureStore([thunk])({ locale: { sourcePrefixes: [], loadedLocales: [], loadedKeys: [] } });
store = configureStore()({ locale: { sourcePrefixes: [], loadedLocales: [], loadedKeys: [] } });
axios.get = sinon.stub().returns(Promise.resolve({ key: 'value' }));
});

Expand Down Expand Up @@ -105,7 +105,7 @@ describe('Locale reducer tests', () => {
describe('with no prefixes and keys loaded', () => {
let store;
beforeEach(() => {
store = configureStore([thunk])({
store = configureStore()({
locale: { currentLocale: defaultLocale, sourcePrefixes: [], loadedLocales: [], loadedKeys: [] },
});
axios.get = sinon.stub().returns(Promise.resolve({ key: 'value' }));
Expand All @@ -131,7 +131,7 @@ describe('Locale reducer tests', () => {
describe('with prefix already added', () => {
let store;
beforeEach(() => {
store = configureStore([thunk])({
store = configureStore()({
locale: { currentLocale: defaultLocale, sourcePrefixes: [sourcePrefix], loadedLocales: [], loadedKeys: [] },
});
axios.get = sinon.stub().returns(Promise.resolve({ key: 'value' }));
Expand All @@ -156,7 +156,7 @@ describe('Locale reducer tests', () => {
describe('with key already loaded', () => {
let store;
beforeEach(() => {
store = configureStore([thunk])({
store = configureStore()({
locale: { currentLocale: defaultLocale, sourcePrefixes: [], loadedLocales: [], loadedKeys: [`${sourcePrefix}${defaultLocale}`] },
});
axios.get = sinon.stub().returns(Promise.resolve({ key: 'value' }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('User management reducer tests', () => {

const resolvedObject = { value: 'whatever' };
beforeEach(() => {
const mockStore = configureStore([thunk]);
const mockStore = configureStore();
store = mockStore({});
axios.get = sinon.stub().returns(Promise.resolve(resolvedObject));
});
Expand Down

0 comments on commit 1605255

Please sign in to comment.