unit testing - Meteor Tinytest packages dependencies -
i test code. compartmentalize code packages. , meteor. i'm trying meteor tinytest meteor test-packages
, i'm getting weirdness. example:
typeerror: cannot read property 'email' of undefined
because of simpleschema.regex.email
. code works when it's not tested. also, simpleschema
object @ point (checked through console.log
), , simpleschema.regex
undefined indeed, not expected.
adding api.use('aldeed:simple-schema', ['server']);
ontest section of package.js
doesn't anything, kind of expected. i'm not sure am fix issue.
apparently there's bug: package.js api.use() loads old versions, (mostly) doesn't matter application matters lot when you're testing packages individually.
to updated