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

#164489920 added test environment #3

Merged
merged 1 commit into from
Mar 25, 2019
Merged

#164489920 added test environment #3

merged 1 commit into from
Mar 25, 2019

Conversation

cop1fab
Copy link
Contributor

@cop1fab cop1fab commented Mar 19, 2019

What does this PR do?

This PR sets unit testing; ensuring all implemented functionality is tested henceforth. This ensures the back end has all functionality working as intended.

Description of Task to be completed?

  • configure the test environment to use mocha and chai

How should it be tested manually?

After cloning the repo, run
npm install to install all necessary dependencies then run npm run test

Pivotal Tracker story?

#164489920

Copy link

@Paccy10 Paccy10 left a comment

Choose a reason for hiding this comment

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

I think in the user test we have to use es6

@cop1fab
Copy link
Contributor Author

cop1fab commented Mar 19, 2019

That is true, I wrote it using ES5 because we do not have babel set up yet.

Copy link

@Paccy10 Paccy10 left a comment

Choose a reason for hiding this comment

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

I think you can set it up

@blaisebakundukize
Copy link
Contributor

I appreciate the way you configured mocha and test script, but I see that you have used es5. I think you'd have installed the needed packages to transpile es6 to es5, then use es6. The test script, I see that it run all file inside the test folder. I was wondering if we could specify the exact files. For example, I want the script to run files have .test.js extension.

test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
@Jaman-dedy
Copy link
Contributor

Hello @cop1fab , I think that it can be better to have one commit per PR, thanks to set it

@ruganda
Copy link
Contributor

ruganda commented Mar 21, 2019

@cop1fab, Good work. Please look into;

  • using es6,
  • changing your PR title to follow our conventions,
  • editing your Pr description to follow the conventions as well.

@cop1fab
Copy link
Contributor Author

cop1fab commented Mar 21, 2019

@cop1fab, Good work. Please look into;

  • using es6,
  • changing your PR title to follow our conventions,
  • editing your Pr description to follow the conventions as well.

Thank you for the feedback, this is has been added to my priority list.

test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
@cop1fab cop1fab requested a review from ruganda March 21, 2019 14:30
@cop1fab cop1fab changed the title [chore#164489920] added test environment #164489920 added test environment Mar 21, 2019
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
@cop1fab cop1fab force-pushed the ch-test-164489920 branch 4 times, most recently from 1c8e353 to e69e255 Compare March 22, 2019 10:45
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
test/user.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved

const server = http.createServer(app);
app.listen(port, () => {
console.log(`Server started successfully on ${port}`);

Choose a reason for hiding this comment

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

Unexpected console statement no-console

@blaisebakundukize
Copy link
Contributor

Thank you Copain, for the PR, I appreciate the work you did and the effort you put in. But I see a lot of comments of HoundCI about the code style. Somewhere it comments that you missed semicolon and arrow-space. Just configure well eslint in your editor so that next time you'll take care of the code style.

- testing environment added using mocha & chai

[Delivers #164489920]
@ruganda ruganda merged commit 74cb454 into develop Mar 25, 2019
@ruganda ruganda deleted the ch-test-164489920 branch March 25, 2019 12:28
Paccy10 pushed a commit that referenced this pull request Apr 1, 2019
# This is the 1st commit message:

Update README.md
# This is the commit message #2:

updated README.md

Added code climate badges.
# This is the commit message #3:

chore(Added test): Added test environment

- testing environment added using mocha & chai

[Delivers #164489920]

# This is the commit message #4:

Update package.json
# This is the commit message #5:

Add Heroku generated app.json
# This is the commit message #6:

Feature (token): setting token based authentication

 -config JWT token using package called json web token

 [Delivers #164489923]

mend

# This is the commit message #7:

[feature#164489925] added user validation

# This is the commit message #8:

Feature (token): setting token based authentication

 -config JWT token using package called json web token

 [Delivers #164489923]

mend

# This is the commit message #9:

Feature(login): Login via google

-creating an application on google
-configure google OAuth passport strategy

[Delivers #164489928]

# This is the commit message #10:

Feature(login): Login via google

-creating an application on google
-configure google OAuth passport strategy

[Delivers #164489928]
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.

None yet

7 participants