Skip to content

Commit 5701bea

Browse files
committed
chore: update readme
1 parent 0f50957 commit 5701bea

10 files changed

+249
-742
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
src/gen/client/*.ts
2+
.nyc_output
3+
coverage

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
.nyc_output
26+
coverage

.nycrc.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"check-coverage": true,
3+
"statements": 80,
4+
"branches": 80,
5+
"functions": 80,
6+
"lines": 80,
7+
"report-dir": "coverage",
8+
"reporter": ["json", "lcov", "html"],
9+
"extension": [".jsx", ".tsx", "ts", "js"],
10+
"include": ["src"],
11+
"exclude": ["node_modules"]
12+
}

README.md

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
# harena - web
1+
# harena-web
22

3-
### Prod
3+
# Env
44

5-
```
6-
https://prod.du109ash2jnw6.amplifyapp.com
7-
```
8-
9-
### Preprod
10-
11-
```
12-
https://preprod.du109ash2jnw6.amplifyapp.com
13-
```
5+
- prod: [https://prod.du109ash2jnw6.amplifyapp.com](https://prod.du109ash2jnw6.amplifyapp.com)
6+
- preprod: [https://preprod.du109ash2jnw6.amplifyapp.com](https://preprod.du109ash2jnw6.amplifyapp.com)

cypress.config.js

+9-41
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,24 @@
1-
import taskCoverage from '@cypress/code-coverage/task';
21
import { defineConfig } from 'cypress';
3-
import mergeReport from 'cypress-sonarqube-reporter/mergeReports';
42

5-
const REQUEST_TIMEOUT = 15_000;
3+
const doCoverageTask = async (on, config) => {
4+
const codeCoverageTask = await import('@cypress/code-coverage/task');
5+
codeCoverageTask.default(on, config);
6+
};
67

78
export default defineConfig({
8-
env: {
9-
codeCoverage: {
10-
exclude: ['cypress/**/*', 'src/**/*.cy.*'],
11-
},
12-
},
13-
video: false,
14-
15-
retries: {
16-
runMode: 3,
17-
openMode: 0,
18-
},
19-
20-
viewportWidth: 2014,
21-
viewportHeight: 844,
22-
defaultCommandTimeout: 30000,
23-
24-
projectId: '4f6tz2',
25-
26-
reporter: 'cypress-multi-reporters',
27-
reporterOptions: {
28-
reporterEnabled: 'cypress-sonarqube-reporter',
29-
mergeFileName: 'test-reports.xml',
30-
cypressSonarqubeReporterReporterOptions: {
31-
overwrite: true,
32-
},
33-
},
349
e2e: {
35-
setupNodeEvents(on, config) {
36-
taskCoverage(on, config);
37-
on('after:run', (result) => {
38-
mergeReport(result, { mergeFileName: 'test-reports.xml' });
39-
});
10+
async setupNodeEvents(on, config) {
11+
await doCoverageTask(on, config);
4012
return config;
4113
},
4214
baseUrl: 'http://localhost:5173/#',
43-
requestTimeout: REQUEST_TIMEOUT,
15+
requestTimeout: 15_000,
4416
},
4517
component: {
46-
setupNodeEvents(on, config) {
47-
taskCoverage(on, config);
48-
on('after:run', (result) => {
49-
mergeReport(result, { mergeFileName: 'test-reports.xml' });
50-
});
18+
async setupNodeEvents(on, config) {
19+
await doCoverageTask(on, config);
5120
return config;
5221
},
53-
specPattern: 'src/**/*.cy.{js,ts,jsx,tsx}',
5422
devServer: {
5523
framework: 'react',
5624
bundler: 'vite',

cypress/support/e2e.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
import '@cypress/code-coverage/support';
12
import './commands';

0 commit comments

Comments
 (0)