We really want Parse to be yours, to see it grow and thrive in the open source community.
- Take testing seriously! Aim to increase the test coverage with every pull request.
- Run the tests for the file you are working on with
npm test spec/MyFile.spec.js
- Run the tests for the whole project and look at the coverage report to make sure your tests are exhaustive by running
npm test
and looking at (project-root)/lcov-report/parse-server/FileUnderTest.js.html - Lint your code by running
npm run lint
to make sure all your code is not gonna be rejected by the CI. - Never publish the lib folder.
If your pull request introduces a change that may affect the storage or retrieval of objects, you may want to make sure it plays nice with Postgres.
-
Run the tests against the postgres database with
PARSE_SERVER_TEST_DB=postgres npm test
. You'll need to have postgres running on your machine and setup appropriately -
If your feature is intended to only work with MongoDB, you should disable PostgreSQL-specific tests with:
describe_only_db('mongo')
// will create adescribe
that runs only on mongoDBit_only_db('mongo')
// will make a test that only runs on mongoit_exclude_dbs(['postgres'])
// will make a test that runs against all DB's but postgres
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to honor this code.