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

Refactored and fixed the frontend test that was failing. #130

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Mortuie
Copy link
Contributor

@Mortuie Mortuie commented Dec 20, 2018

  • Refactored the action tests into one file.
  • Made all frontend tests pass

@Mortuie Mortuie requested review from vivekimsit and nikrb December 20, 2018 21:46
@nikrb
Copy link
Contributor

nikrb commented Dec 20, 2018

backend test is failing for me, has mongo version changed in package.json or something?

the options [useNewUrlParser] is not supported

and then :

  4 passing (473ms)
  2 failing

  1) User model
       insert
         should register a new user:
     TypeError: Cannot read property '_id' of null
      at Context.it (models/user/user.unit.spec.js:43:23)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

  2) User model
       insert
         should reject duplicate email on registration:
     TypeError: Cannot read property '_id' of null
      at Context.it (models/user/user.unit.spec.js:58:24)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

Would you rather keep that as a separate issue/pr as it's backend ?

@Mortuie
Copy link
Contributor Author

Mortuie commented Dec 21, 2018

@nikrb separate issue yes, also the newUrlParser is the option I added yesterday to prevent the deprecation warning on the backend So it seems that that might have fucked things up. Will have to look into that! -> Make a separate issue as this is only for frontend tests and the issues aren't related. The error message points to it being a sole backend problem.

@Mortuie
Copy link
Contributor Author

Mortuie commented Dec 21, 2018

@nikrb we also get [0] (node:14100) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

and [0] (node:14100) DeprecationWarning: collection.update is deprecated. Use updateOne, updateMany, or bulkWrite instead.

Copy link
Contributor

@nikrb nikrb left a comment

Choose a reason for hiding this comment

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

LGTM

@Mortuie
Copy link
Contributor Author

Mortuie commented Dec 21, 2018

@nikrb still need approval :P

@Mortuie
Copy link
Contributor Author

Mortuie commented Dec 21, 2018

@nikrb for the backend tests, what are you running, I can't seem to find what to execute to get that output?

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