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

Mocks library #2

Closed
cleverbeagle opened this issue May 25, 2017 · 3 comments
Closed

Mocks library #2

cleverbeagle opened this issue May 25, 2017 · 3 comments
Assignees
Labels

Comments

@cleverbeagle
Copy link
Owner

There's a lot of internal code for Meteor that will need mocking. There are quite a few third-party solutions to this already, but they're a bit piecemeal. It'd be best to sample from these existing implementations and combine them into something that we can manage and expand under Pup.

Need mocking for:

  • Meteor internals (e.g., Meteor.users, Accounts, etc) <-- the "big one"
  • Mocking MongoDB collections
  • NPM packages used in Pup
  • Example third-party request (Github?) library
@cleverbeagle cleverbeagle self-assigned this May 25, 2017
@cleverbeagle cleverbeagle added this to Proposed in Tests May 25, 2017
@ninjaPixel
Copy link
Contributor

Rather than going to all the effort of mocking Accounts, MongoDB etc how about using an end-to-end framework, for these tests?
I've had great success with Test Cafe to test things like a/c creation, logging in etc.
The benefits of doing it this way are:

  1. We also test the UI
  2. We don't have to write mocks or keep them up-to-date

@cleverbeagle
Copy link
Owner Author

Do you have any examples of this being put to use in Meteor? On the surface this sounds ideal from the acceptance test side of things. How does it handle things like unit testing (or are you suggesting we use this independently of unit/integration tests)?

@ninjaPixel
Copy link
Contributor

ninjaPixel commented Sep 20, 2017

I use Test Cafe for Gluless (which is a Meteor project). I can show it to you on a Hangout if you like.

It's completely separate to my unit tests. I generally unit test whatever can be unit tested, but more involved stuff (e.g. something that requires a user account, or testing of the UI) is done with Test Cafe.

@cleverbeagle cleverbeagle removed this from Proposed in Tests Sep 29, 2017
linegel added a commit to linegel/pup that referenced this issue Nov 25, 2019
- Upgraded Meteor version to the latest one
- Upgraded all non-conflicted Meteor dependencies
- Added .idea service folder to .gitignore

*Issues*:
- Because of incorectly configured seedr apps not starting properly, next commit will be with fix for imports/startup/server/fixtures.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants