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

[Request] Import/require Tracker dependency #16

Open
ejfrancis opened this issue Jul 20, 2017 · 4 comments
Open

[Request] Import/require Tracker dependency #16

ejfrancis opened this issue Jul 20, 2017 · 4 comments

Comments

@ejfrancis
Copy link

ejfrancis commented Jul 20, 2017

This may not be a typical use case, but I'm running unit tests for a Meteor app with Jest and circumventing Meteor's test command. If you were to change this package from using Tracker as global to an imported/required dependency, I could mock its import with a moduleNameMapper in jest.

So instead of just doing

Tracker.autorun()

It would be great if the dependency was explicitly imported/required

const { Tracker } = require('meteor/tracker');

....
Tracker.autorun()
@ejfrancis
Copy link
Author

done in pr #17

@ejfrancis
Copy link
Author

@Akryum anything else you need to get this merged?

@carboniris
Copy link

This would also be very useful in combination with Meteor Client Bundler, to use Meteor reactivity with webpack and vue-loader.

@GeoffreyBooth
Copy link

I just got hit by this too. @Akryum can we please fix this?

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

No branches or pull requests

3 participants