Skip to content

Commit 433de4a

Browse files
committed
remove docos
1 parent 6863ee0 commit 433de4a

File tree

5 files changed

+9
-60
lines changed

5 files changed

+9
-60
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
- name: Check Linting
2626
run: npm run lint
2727

28-
unit-tests:
28+
tests:
2929
runs-on: ubuntu-latest
30-
name: Unit Tests
30+
name: Tests
3131
steps:
3232
- name: Fix usage of insecure GitHub protocol
3333
run: sudo git config --system url."https://github".insteadOf "git://github"
@@ -39,26 +39,8 @@ jobs:
3939
cache: 'npm'
4040
- name: Install Dependencies
4141
run: npm ci
42-
- name: Run Unit Tests
43-
run: npm run test:unit
44-
45-
e2e-tests:
46-
runs-on: ubuntu-latest
47-
name: End-to-End Tests
48-
steps:
49-
- name: Fix usage of insecure GitHub protocol
50-
run: sudo git config --system url."https://github".insteadOf "git://github"
51-
- uses: actions/checkout@v3
52-
- name: Use Node.js 22
53-
uses: actions/setup-node@v3
54-
with:
55-
node-version: 22
56-
cache: 'npm'
57-
- name: Install Dependencies
58-
run: npm ci
59-
- name: Run e2e Tests
60-
run: npm run test:e2e
61-
42+
- name: Run Tests
43+
run: npm test
6244
concurrency:
6345
group: ${{ github.workflow }}-${{ github.ref }}
6446
cancel-in-progress: true

.nycrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"text-summary"
55
],
66
"exclude": [
7-
"**/e2e/**",
8-
"**/tests/**"
7+
"**/spec/**"
98
]
109
}
1110

README.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,39 +57,9 @@ These scripts can help you to develop your app for Parse Server:
5757
* `npm run lint` will check the linting of your cloud code, tests and `index.js`, as defined in `.eslintrc.json`.
5858
* `npm run lint-fix` will attempt fix the linting of your cloud code, tests and `index.js`.
5959
* `npm run prettier` will help improve the formatting and layout of your cloud code, tests and `index.js`, as defined in `.prettierrc`.
60-
* `npm run test:e2e` will run any e2e tests that are written in `/e2e`.
61-
* `npm run test:unit` will run any unit tests that are written in `tests`
6260
* `npm test` will run all tests
6361
* `npm run coverage` will run tests and check coverage. Output is available in the `/coverage` folder.
6462

65-
## Testing
66-
67-
Effective testing is crucial for maintaining the stability and reliability of your application. The testing pyramid is a widely adopted strategy to balance different types of tests and ensure a robust testing process.
68-
69-
### Testing Pyramid
70-
The testing pyramid emphasizes the following layers:
71-
72-
1. Unit Tests:
73-
- Focus on testing individual functions or components in isolation.
74-
- Fast, reliable, and provide detailed feedback on specific parts of your code.
75-
- Recommended to have a large amount of unit tests that test small units of code
76-
- These tests should use mocks to simulate dependencies, eliminating the need for the entire system to be operational.
77-
- Example: Testing a utility function or a cloud function independently.
78-
- Command: `npm run test:unit`
79-
80-
2. Integration Tests:
81-
- Validate that different modules or components work together correctly.
82-
- Useful for testing database interactions, API endpoints, or cloud function workflows.
83-
- Recommended to have a medium amount of integration tests that test the integration of units.
84-
- Typically slower than unit tests but cover a broader scope.
85-
86-
3. End-to-End (E2E) Tests:
87-
- Test the application as a whole, simulating real user interactions.
88-
- Validate that the entire system works as expected, from the user interface to the backend.
89-
- Recommmended to have a small amount of e2e tests.
90-
- Example: Testing user login or data submission flows.
91-
- Command: `npm run test:e2e`
92-
9363
## Configuration
9464

9565
Configuration is located in `config.js`.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
"main": "index.js",
1111
"scripts": {
1212
"coverage": "nyc --reporter=html --reporter=text npm test",
13-
"lint": "eslint --cache ./cloud && eslint --cache index.js && eslint --cache ./e2e",
14-
"lint-fix": "eslint --cache --fix ./cloud && eslint --cache --fix index.js && eslint --cache --fix ./e2e",
15-
"prettier": "prettier --write '{cloud,e2e}/{**/*,*}.js' 'index.js'",
13+
"lint": "eslint --cache ./cloud && eslint --cache index.js && eslint --cache ./spec",
14+
"lint-fix": "eslint --cache --fix ./cloud && eslint --cache --fix index.js && eslint --cache --fix ./spec",
15+
"prettier": "prettier --write '{cloud,spec}/{**/*,*}.js' 'index.js'",
1616
"start": "node index.js",
1717
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=7.0.1} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
1818
"test": "TESTING=true jasmine",
19-
"posttest:e2e": "mongodb-runner stop --all",
19+
"posttest": "mongodb-runner stop --all",
2020
"watch": "nodemon index.js"
2121
},
2222
"dependencies": {

spec/Tests.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// E2E tests should be minimal and only test the integration of the Parse Server.
2-
// Unit tests are preferred as they are faster and more reliable, and do not require a running Parse Server.
31
describe('Parse Server example', () => {
42
Parse.User.enableUnsafeCurrentUser();
53
it('call function', async () => {

0 commit comments

Comments
 (0)