Skip to content

Commit 3dea422

Browse files
committed
Updating running test guide to not run server
1 parent 642f813 commit 3dea422

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Contributing to Real Dev Squad API
32

43
- [Getting Started](#getting-started)
@@ -25,19 +24,22 @@ The script associated with `npm run test` will run all tests that ensures that y
2524
repository. This will run the lint, integration and unit tests.
2625

2726
##### `npm run lint`
27+
2828
Runs the lint checks in the project.
2929

3030
##### `npm run generate-api-schema`
31+
3132
Generates the API schema in the file `public/apiSchema.json`.
3233

3334
##### `npm run validate-setup`
34-
Runs the test for checking local development setup is working properly or not.
3535

36+
Runs the test for checking local development setup is working properly or not.
3637

3738
## Project Structure
39+
3840
The following project structure should be followed:
3941

40-
``` shell script
42+
```shell script
4143
|-- website-backend
4244
|-- config
4345
| |-- custom-environment-variables.js
@@ -89,6 +91,7 @@ The following project structure should be followed:
8991
```
9092
9193
## Generating Authentication Token
94+
9295
- Run the project locally, make sure the server is listening to requests
9396
- Navigate to `https://github.com/login/oauth/authorize?client_id=<GITHUB_CLIENT_ID>`
9497
- Authorize the application
@@ -97,8 +100,8 @@ The following project structure should be followed:
97100
- For non-production environments, authentication is also supported with the `Authorization` header.
98101
- Authorization header: `Authorization: Bearer <token>`
99102
100-
101103
## Testing Guidelines
104+
102105
- Libraries used in testing in the project:
103106
- [mocha](https://mochajs.org/): Test framework
104107
- [chai](https://www.chaijs.com/): Assertion library
@@ -110,6 +113,7 @@ The following project structure should be followed:
110113
- Java version 1.8 or higher.
111114
112115
## Using Firebase Emulator Locally
116+
113117
- [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite) can be used locally as the DB for the project
114118
- Pre-requisites:
115119
- Node.js version 8.0 or higher.
@@ -119,15 +123,18 @@ The following project structure should be followed:
119123
- [Future] You can view the emulator UI at: `http://localhost:4000`
120124
121125
## Running test scripts on Windows
126+
122127
- Git Bash is recommended for running test scripts on Windows.
123128
- Run `npm run test-integration` for running integration tests.
124129
- Run `npm run test-unit` for running unit tests.
125-
- Make sure to close the emulator window after running the tests in order to avoid the blocking of the port for the next tests to run.
130+
- Make sure the server is not running.
131+
- Make sure to close the emulator window after running the tests in order to avoid the blocking of the port for the next tests to run.
126132
- For e.g - After running the integration tests, close the emulator window and then run the command for unit tests.
127133
128134
## Pull request guidelines
135+
129136
- Ensure that the tests pass locally before raising a PR.
130137
- All pull requests should have base as the develop branch.
131138
- Every pull request should have associated issue(s) on our [issue tracker](https://github.com/Real-Dev-Squad/website-backend/issues).
132139
- For any non-trivial fixes and features, unit and integration tests must be added. The PR reviewer should not approve/merge PR(s) that lack these.
133-
- The PR(s) should be merged only after the CI passes.
140+
- The PR(s) should be merged only after the CI passes.

0 commit comments

Comments
 (0)