jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.5k stars 4.02k forks source link

Jest is not in src/test/javascript folder #26450

Closed flyliu33 closed 3 months ago

flyliu33 commented 3 months ago
Overview of the issue

there is no unit test in src/test/javascript folder, but they are actual in the same folder of feature and they can work well. e.g. src/main/webapp/app/account/login-form/login-form.component.ts src/main/webapp/app/account/login-form/login-form.component.spec.ts

and jhipster cannot create src/test/javascript/jest.conf.js automatically, though .eslintignore includes this refference

node_modules/
src/main/docker/
src/test/javascript/jest.conf.js
webpack/
target/
build/
node/
coverage/
postcss.config.js
target/classes/static/

BTW, can I run integration test with real API by Jest? how to set up and run, thanks.

Motivation for or Use Case
Reproduce the error

npm install -g generator-jhipster

Related issues
Suggest a Fix
JHipster Version(s)

v8.5.0

JHipster configuration

Welcome to JHipster v8.5.0

Welcome to the JHipster Information Sub-Generator

road@0.0.0 C:\workspace\bi\road
`-- generator-jhipster@8.5.0
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "road",
    "buildTool": "maven",
    "cacheProvider": "ehcache",
    "clientFramework": "vue",
    "clientTestFrameworks": [],
    "clientTheme": "none",
    "creationTimestamp": 1718347986052,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "devServerPort": 9060,
    "enableHibernateCache": true,
    "enableSwaggerCodegen": true,
    "enableTranslation": true,
    "entities": [],
    "feignClient": null,
    "jhipsterVersion": "8.5.0",
    "languages": [
      "zh-cn",
      "en"
    ],
    "messageBroker": false,
    "microfrontend": null,
    "microfrontends": [],
    "nativeLanguage": "zh-cn",
    "packageName": "com.jlzn.road",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": null,
    "serverSideOptions": [
      "websocket:spring-websocket",
      "enableSwaggerCodegen:true"
    ],
    "serviceDiscoveryType": false,
    "syncUserWithIdp": null,
    "testFrameworks": [],
    "websocket": "spring-websocket",
    "withAdminUi": true
  }
}
Environment and Tools

openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment (build 21.0.2+13-58) OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)

git version 2.45.1.windows.1

node: v20.13.1 npm: 10.5.2

Docker version 26.0.0, build 2ae903e

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Congratulations, JHipster execution is complete! If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/

Thanks for using JHipster!

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System

Edition Windows 11 Pro Version 23H2 Install Date β€Ž2024/β€Ž4/β€Ž23 OS version 22631.3593 Experience Windows Feature Experience Pack 1000.22700.1003.0

mshima commented 3 months ago

BTW, can I run integration test with real API by Jest? how to set up and run, thanks.

No Jest is to test components, apis are tested by junit integration tests, glating, cypress.