0

I try to include meteor down into my application like the telescope example: https://gist.github.com/mnmtanish/fe4f7efb3db24e83c310

var mdown = new MeteorDown(function(error, client){
    //code block
});

My console tells me: Uncaught TypeError: undefined is not a function

meteor list meteorhacks:meteor-down 1.1.1 Load Testing Framework for Meteor

Senju
  • 435
  • 2
  • 5
  • 20

1 Answers1

1

Looks like shortly after that gist was posted the API had changed. If you look at this commit: https://github.com/meteorhacks/meteor-down/commit/7791be3a912f37c5a7cf82a230344fb1f761edcd

-      var mdown = new MeteorDown(function (error, client) {
-      client.call('add', x, y, function (err, res) {

was removed. It looks like meteorDown is now what you want to use. I would suggest looking through the Meteor Down documentation for the latest usage of the API

Specifically the Readme shows the new way to handle this below:

meteorDown.init(function (Meteor) {
    Meteor.call('example-method', function (error, result) {
    Meteor.kill();
  });
});

meteorDown.run({
  concurrency: 10,
  url: "http://localhost:3000"
});
  • this code works fine so far if it is in a sperated .js file to start it with the shell: `meteor-down my_load_test.js` I am looking to include it into the client.js so I can start the script with a button for example. – Senju May 30 '15 at 09:29
  • `var mdown = new meteorDown(function(error, client){ //code block });` results: `Uncaught ReferenceError: meteorDown is not defined` – Senju May 30 '15 at 09:50