Skip to content

Commit 12d8029

Browse files
feat: completely remove testing and mocking
1 parent 5b66d98 commit 12d8029

34 files changed

Lines changed: 106 additions & 6324 deletions

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ VITE_APP_API_URL=http://localhost:8080/api/v1
77

88
VITE_APP_APP_URL=http://localhost:3000
99
VITE_APP_APP_MOCK_API_PORT=8080
10-
VITE_APP_ENABLE_API_MOCKING=false
10+

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
VITE_APP_API_URL=https://api.realworldapp.com
2-
VITE_APP_ENABLE_API_MOCKING=true

.env.example-e2e

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
VITE_APP_API_URL=http://localhost:8080/api
2-
VITE_APP_ENABLE_API_MOCKING=false
2+
33
VITE_APP_MOCK_API_PORT=8080
44
VITE_APP_URL=http://localhost:3000

.eslintrc.cjs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ module.exports = {
55
es6: true,
66
},
77
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
8-
ignorePatterns: [
9-
'node_modules/*',
10-
'public/mockServiceWorker.js',
11-
'generators/*',
12-
],
8+
ignorePatterns: ['node_modules/*', 'generators/*'],
139
extends: ['eslint:recommended'],
1410
plugins: ['check-file'],
1511
overrides: [
@@ -37,10 +33,6 @@ module.exports = {
3733
'plugin:react-hooks/recommended',
3834
'plugin:jsx-a11y/recommended',
3935
'plugin:prettier/recommended',
40-
'plugin:testing-library/react',
41-
'plugin:jest-dom/recommended',
42-
'plugin:tailwindcss/recommended',
43-
'plugin:vitest/legacy-recommended',
4436
],
4537
rules: {
4638
'import/no-restricted-paths': [

.gitignore

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55
/.pnp
66
.pnp.js
77

8-
# testing
9-
/coverage
10-
/test-results/
11-
/playwright-report/
12-
/blob-report/
13-
/playwright/.cache/
14-
/e2e/.auth/
8+
159

1610
# storybook
1711
migration-storybook.log
@@ -36,6 +30,5 @@ yarn-error.log*
3630

3731

3832
# local
39-
mocked-db.json
4033

4134
.aider*

.storybook/main.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

.storybook/preview.tsx

Lines changed: 0 additions & 15 deletions
This file was deleted.

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ RUN yarn install --frozen-lockfile
1010

1111
COPY . .
1212
RUN yarn build
13-
RUN rm /app/dist/mockServiceWorker.js
1413

1514
# Final stage with just artifacts
1615
FROM scratch
@@ -22,6 +21,6 @@ COPY --from=builder /app/dist /
2221
# -o dist .
2322

2423
# docker build \
25-
# --build-arg VITE_APP_API_URL=https://rwapi.minhhoccode111.com/api/v1 \
26-
# --build-arg VITE_APP_APP_URL=https://rw.minhhoccode111.com \
24+
# --build-arg VITE_APP_API_URL=https://realworldapi.minhhoccode111.com/api/v1 \
25+
# --build-arg VITE_APP_APP_URL=https://realworld.minhhoccode111.com \
2726
# -o dist .

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
> ### React codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld) specs.
44
5+
## [Demo](https://realworld.minhhoccode111.com)
6+
7+
## [Swagger](https://realworldapi.minhhoccode111.com/swagger)
8+
59
## Routing
610

711
- Home page (URL: /#/ )
@@ -104,7 +108,6 @@ Here’s a breakdown of cache management strategies for different actions:
104108
- [x] Replace jwt-in-header with jwt-in-cookie for better security
105109
- [ ] Add updating of an article's tags list
106110
- [ ] Add filtering of articles using multiple tags
107-
- [ ] Add mocks, unit testing, integration testing
108111

109112
## Get Started
110113

docs/project-structure.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ src
2323
|
2424
+-- lib # reusable libraries preconfigured for the application
2525
|
26-
+-- stores # global state stores
27-
|
28-
+-- testing # test utilities and mocks
29-
|
26+
+-- stores # global state stores
3027
+-- types # shared types used across the application
3128
|
3229
+-- utils # shared utility functions

0 commit comments

Comments
 (0)