diff --git a/generators/client/templates/react/jest.conf.js.ejs b/generators/client/templates/react/jest.conf.js.ejs index ee77c1e6407..dd8029c4a62 100644 --- a/generators/client/templates/react/jest.conf.js.ejs +++ b/generators/client/templates/react/jest.conf.js.ejs @@ -1,6 +1,7 @@ const tsconfig = require('./tsconfig.json'); module.exports = { + testEnvironment: 'jsdom', transform: { '^.+\\.tsx?$': 'ts-jest' }, diff --git a/generators/client/templates/react/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs b/generators/client/templates/react/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs index 4ce6a494e54..6e2eea0810d 100644 --- a/generators/client/templates/react/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs +++ b/generators/client/templates/react/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs @@ -16,9 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. -%> -/** - * @jest-environment jsdom - */ import axios from 'axios'; import sinon from 'sinon'; diff --git a/generators/client/templates/react/src/main/webapp/app/modules/account/settings/settings.reducer.spec.ts.ejs b/generators/client/templates/react/src/main/webapp/app/modules/account/settings/settings.reducer.spec.ts.ejs index 75a2663237b..d7b6d04b093 100644 --- a/generators/client/templates/react/src/main/webapp/app/modules/account/settings/settings.reducer.spec.ts.ejs +++ b/generators/client/templates/react/src/main/webapp/app/modules/account/settings/settings.reducer.spec.ts.ejs @@ -16,10 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. -%> - -/** - * @jest-environment jsdom - */ import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import axios from 'axios'; diff --git a/generators/client/templates/react/src/main/webapp/app/shared/auth/private-route.spec.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/shared/auth/private-route.spec.tsx.ejs index 9476bb17069..50428a6f17a 100644 --- a/generators/client/templates/react/src/main/webapp/app/shared/auth/private-route.spec.tsx.ejs +++ b/generators/client/templates/react/src/main/webapp/app/shared/auth/private-route.spec.tsx.ejs @@ -1,6 +1,3 @@ -/** - * @jest-environment jsdom - */ import React from 'react'; import { Router } from 'react-router-dom'; import { createMemoryHistory } from 'history'; diff --git a/generators/client/templates/react/src/main/webapp/app/shared/error/error-boundary-route.spec.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/shared/error/error-boundary-route.spec.tsx.ejs index 4920d4e07de..ebe2b035589 100644 --- a/generators/client/templates/react/src/main/webapp/app/shared/error/error-boundary-route.spec.tsx.ejs +++ b/generators/client/templates/react/src/main/webapp/app/shared/error/error-boundary-route.spec.tsx.ejs @@ -1,6 +1,3 @@ -/** - * @jest-environment jsdom - */ import React from 'react'; import { Router } from 'react-router-dom'; import { createMemoryHistory } from 'history'; diff --git a/generators/client/templates/react/src/main/webapp/app/shared/error/error-boundary.spec.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/shared/error/error-boundary.spec.tsx.ejs index f3b1e5c21ee..9acce611156 100644 --- a/generators/client/templates/react/src/main/webapp/app/shared/error/error-boundary.spec.tsx.ejs +++ b/generators/client/templates/react/src/main/webapp/app/shared/error/error-boundary.spec.tsx.ejs @@ -1,6 +1,3 @@ -/** - * @jest-environment jsdom - */ import React from 'react'; import { render } from '@testing-library/react'; diff --git a/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.spec.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.spec.tsx.ejs index 664f9c133f7..96d559b9998 100644 --- a/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.spec.tsx.ejs +++ b/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.spec.tsx.ejs @@ -16,9 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. -%> -/** - * @jest-environment jsdom - */ import React from 'react'; import { render } from '@testing-library/react'; import { Provider } from 'react-redux'; diff --git a/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/account.spec.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/account.spec.tsx.ejs index f7f5ed50ede..96699801b22 100644 --- a/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/account.spec.tsx.ejs +++ b/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/account.spec.tsx.ejs @@ -16,9 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. -%> -/** - * @jest-environment jsdom - */ import React from 'react'; import { render } from '@testing-library/react'; import { Router } from 'react-router-dom'; diff --git a/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.spec.ts.ejs b/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.spec.ts.ejs index 5699b2b46cc..410cc551ef2 100644 --- a/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.spec.ts.ejs +++ b/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.spec.ts.ejs @@ -16,10 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. -%> - -/** - * @jest-environment jsdom - */ import thunk from 'redux-thunk'; import axios from 'axios'; import sinon from 'sinon';