percolatestudio / meteor-migrations

Simple migration system for Meteor
https://atmospherejs.com/percolate/migrations
MIT License
245 stars 58 forks source link

Tests do not execute properly? #2

Closed MiiCode2 closed 10 years ago

MiiCode2 commented 10 years ago

Well, they do work if you do the following:

package.js

change this

Package.on_test(function (api) { api.use('percolatestudio-migrations'); <<------ api.add_files('migrations_tests.js', ['server']); });

to this

Package.on_test(function (api) { api.use(['percolatestudio-migrations', 'tinytest'], 'server'); <<------ api.add_files('migrations_tests.js', ['server']); });

and in migrations_server.js

change

//reset (mainly intended for tests) Migrations._reset = function() { this._list = [{version: 0, up: function(){}}]; this._collection.remove({}, false); <<------- }

to this

//reset (mainly intended for tests) Migrations._reset = function() { this._list = [{version: 0, up: function(){}}]; this._collection.remove({}); <<------- }

zol commented 10 years ago

Thanks @MiiCode2 for the report. I've updated the test with your changes - they're now passing against the latest meteor. New version is pushed to atmosphere.