test generation assert parameter order is wrong, should be assert(actual, expected)

Issue #121 resolved
leif created an issue

We got:

    it('should handle server errors', function (done){

      mockedDependencies.easyRequest.HTML = function (options, cb){
        cb(null, 'hello from google');
      };

      var config = {};
      prometheus_alerts_SUT.onRun(config, mockedDependencies, function(err, data){
        assert.equal('hello from google', data.html, 'expected a different reply from google: ' + data.html);
        done();
      });
    });

which should be assert(actual, expected)

    it('should handle server errors', function (done){

      mockedDependencies.easyRequest.HTML = function (options, cb){
        cb(null, 'hello from google');
      };

      var config = {};
      prometheus_alerts_SUT.onRun(config, mockedDependencies, function(err, data){
        assert.equal(data.html, 'hello from google', 'expected a different reply from google: ' + data.html);
        done();
      });
    });

I might provide a PR next week or so.

Regards Leif

Comments (5)

  1. Log in to comment