This pull request introduces changes across various test files to utilize environment variables for sensitive information such as email addresses and passwords. This is a security best practice that prevents hardcoding credentials in the test files.
Summary
Added require('dotenv').config(); to the top of each test file to load environment variables.
Replaced hardcoded email addresses and passwords with process.env.TEST_EMAIL and process.env.TEST_PASSWORD respectively in the login and registration payloads across all test files.
Specifically, in user.test.js, for a delete operation test case, replaced the hardcoded credentials with process.env.DELETE_TEST_EMAIL and process.env.DELETE_TEST_PASSWORD to differentiate between general test credentials and those used for delete operations.
Affected test files:
test/app.test.js
test/bookCategory.test.js
test/booksByAuthor.test.js
test/booksSearch.test.js
test/user.test.js
This change ensures that our tests are more secure and our sensitive credentials are not exposed within our codebase.
Fixes #115.
π Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request introduces changes across various test files to utilize environment variables for sensitive information such as email addresses and passwords. This is a security best practice that prevents hardcoding credentials in the test files.
Summary
require('dotenv').config();
to the top of each test file to load environment variables.process.env.TEST_EMAIL
andprocess.env.TEST_PASSWORD
respectively in the login and registration payloads across all test files.user.test.js
, for a delete operation test case, replaced the hardcoded credentials withprocess.env.DELETE_TEST_EMAIL
andprocess.env.DELETE_TEST_PASSWORD
to differentiate between general test credentials and those used for delete operations.test/app.test.js
test/bookCategory.test.js
test/booksByAuthor.test.js
test/booksSearch.test.js
test/user.test.js
This change ensures that our tests are more secure and our sensitive credentials are not exposed within our codebase.
Fixes #115.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.