Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#-187431151 implementing jest test in sign up #15

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

Tuyisenge2
Copy link
Collaborator

What does this PR do?
This pr is responsible for testing sign up end points

@Tuyisenge2 Tuyisenge2 force-pushed the ft-user-register-187431151 branch 2 times, most recently from 8d66432 to e74adb3 Compare April 22, 2024 16:52
if (req.body) {
const { error } = userValidate(req.body);
if (error) {
return res
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.

);
}
if (error)
return res
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.

@Tuyisenge2 Tuyisenge2 force-pushed the ft-user-register-187431151 branch from e74adb3 to 1531571 Compare April 22, 2024 17:45
);

export default passport;
import { Request } from "express";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,23 @@
import { hashPassword } from "../utils/password";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@@ -0,0 +1,15 @@

export const deleteTableData = async (Model: any, tableName: string) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@Tuyisenge2 Tuyisenge2 force-pushed the ft-user-register-187431151 branch 2 times, most recently from d5cb000 to 0fcd223 Compare April 22, 2024 18:18
@leandreAlly leandreAlly added enhancement New feature or request and removed Ready for Review labels Apr 22, 2024
@Tuyisenge2 Tuyisenge2 force-pushed the ft-user-register-187431151 branch from 0fcd223 to 01f270c Compare April 22, 2024 18:40
password: "<Password@345>",
};

export const login_user = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

@Tuyisenge2 Tuyisenge2 force-pushed the ft-user-register-187431151 branch from 01f270c to f617513 Compare April 22, 2024 18:46

it("should create a new user", async () => {
// Your test implementation goes here
it("it should register a user and return 201", async () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

Copy link

codeclimate bot commented Apr 22, 2024

Code Climate has analyzed commit f617513 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

The test coverage on the diff in this pull request is 88.0% (60% is the threshold).

This pull request will bring the total coverage in the repository to 87.5% (2.0% change).

View more on Code Climate.

@leandreAlly leandreAlly added Ready for Review and removed enhancement New feature or request labels Apr 22, 2024
@leandreAlly leandreAlly merged commit abbc596 into develop Apr 22, 2024
6 checks passed
Angemichel12 pushed a commit that referenced this pull request Apr 25, 2024
#-187431151 implementing jest test in sign up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants