Skip to content

Conversation

@LALY6505
Copy link

The purpose of this project is to practice unit tests in javascript. You have to write tests to all modules in the modules folder. You'll have to add code to some functions.

Copy link
Owner

@gemtechd gemtechd left a comment

Choose a reason for hiding this comment

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

  1. You have to make changes in the code itself (checks for parameters), that the code will be good code
  2. remove all comments before pushing

package.json Outdated
"dependencies": {
"jest": "^29.7.0"
"jest": "^29.7.0",
"coverage":"npm run test -- --coverage"
Copy link
Owner

Choose a reason for hiding this comment

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

This is not the correct place for these modules

Copy link
Owner

Choose a reason for hiding this comment

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

this problem is still not fixed
and don't write scripts inside dependencies

const line = new Line({ point1, point2 });
line.calculateSlope();
line.calculateNOfLineFunction();
const pointOnXAxis = line.getPointOnXAsis();
Copy link
Owner

Choose a reason for hiding this comment

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

You don't use different functions in the tests to assure that you test won't fail
You have to change the code itself

Copy link
Owner

Choose a reason for hiding this comment

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

this problem is still not fixed

const line = new Line({ point1, point2 });
line.calculateSlope();
line.calculateNOfLineFunction();
const pointOnYAxis = line.getPointOnYAsis();
Copy link
Owner

Choose a reason for hiding this comment

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

You don't use different functions in the tests to assure that you test won't fail
You have to change the code itself

Copy link
Owner

Choose a reason for hiding this comment

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

this problem is still not fixed

const line = new Line({ point1, point2 });
line.calculateSlope();
line.calculateNOfLineFunction();
const targetX = 4;
Copy link
Owner

Choose a reason for hiding this comment

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

You don't use different functions in the tests to assure that you test won't fail
You have to change the code itself

Copy link
Owner

Choose a reason for hiding this comment

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

These file will be tested after you'll make some changes in the code

Copy link
Owner

Choose a reason for hiding this comment

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

this problem is still not fixed

Copy link
Owner

@gemtechd gemtechd left a comment

Choose a reason for hiding this comment

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

Work on all comments
good luck

const line = new Line({ point1, point2 });
line.calculateSlope();
line.calculateNOfLineFunction();

Copy link
Owner

Choose a reason for hiding this comment

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

it the tests, you test only one function.
Why do you call the calculateSlope here?

const line = new Line({ point1, point2 });
line.calculateSlope();
line.calculateNOfLineFunction();
const pointOnYAxis = line.getPointOnYAsis();
Copy link
Owner

Choose a reason for hiding this comment

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

this problem is still not fixed

const line = new Line({ point1, point2 });
line.calculateSlope();
line.calculateNOfLineFunction();
const pointOnXAxis = line.getPointOnXAsis();
Copy link
Owner

Choose a reason for hiding this comment

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

this problem is still not fixed

Copy link
Owner

Choose a reason for hiding this comment

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

this problem is still not fixed

package.json Outdated
"dependencies": {
"jest": "^29.7.0"
"jest": "^29.7.0",
"coverage":"npm run test -- --coverage"
Copy link
Owner

Choose a reason for hiding this comment

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

this problem is still not fixed
and don't write scripts inside dependencies

@LALY6505
Copy link
Author

LALY6505 commented Sep 1, 2024

I push the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants