I am new to Meteor Cucumber I am trying to do a basic test
Check a new user here is the step definition code
this.Given(/^I am a new user$/, function () {
server.call('fixtures/reset').then(function() {
server.call('fixtures/seedData');
});
});
I get
Error: Method not found [404] ... at World. (/tests/cucumber/features/step_definitions/static_page.js:17:20)
which points to the first server.call (column 20 is the c of call)
here is the feature Given I am a new user
here is the fixture
(function () {
'use strict';
Meteor.methods({
'fixtures/reset': function () {
Meteor.users.remove({});
},
'fixtures/seedData': function () {
Accounts.createUser({
email: "bob@example.com",
password: "testtest"
});
}
});
})();
here is the package.js
Package.describe({
name: 'fixtures',
version: '0.0.1',
summary: '',
git: '',
documentation: null,
debugOnly: true
});
Package.onUse(function(api) {
api.versionsFrom('1.2.1');
api.use('ecmascript');
api.addFiles(['fixtures.js'],['server']);
});
I don't understand why this code is failing
It is based on http://ift.tt/1KWGR87
Thanks for your help
Aucun commentaire:
Enregistrer un commentaire