vue-meteor-tracker icon indicating copy to clipboard operation
vue-meteor-tracker copied to clipboard

[Request] Import/require Tracker dependency

Open ejfrancis opened this issue 8 years ago • 4 comments
trafficstars

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 avatar Jul 20 '17 01:07 ejfrancis

done in pr #17

ejfrancis avatar Aug 15 '17 00:08 ejfrancis

@Akryum anything else you need to get this merged?

ejfrancis avatar Sep 20 '17 00:09 ejfrancis

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

carboniris avatar Dec 06 '17 13:12 carboniris

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

GeoffreyBooth avatar Jan 15 '19 22:01 GeoffreyBooth