Beispiel #1
0
function renameText(name) {
  var newName = mapping.rename[name] || name;
  return [
    'lodash-migrate: Method renamed',
    '  v' + old.VERSION + ' => _.' + name,
    '  v' + _.VERSION   + ' => _.' + newName
  ].join('\n');
}

/*----------------------------------------------------------------------------*/

QUnit.testStart(function() {
  logs.length = 0;
});

QUnit.module('lodash-migrate');

(function() {
  QUnit.test('should return older lodash', function(assert) {
    assert.expect(1);

    assert.strictEqual(require('../index.js'), old);
  });
}());

/*----------------------------------------------------------------------------*/

QUnit.module('iteration method');

(function() {
  QUnit.test('should not invoke `iteratee` in new lodash', function(assert) {
Beispiel #2
0
        func(2, 4);
      }
    }
  }
  catch (e) {
    console.log(e);
    pass = false;
  }
  assert.ok(pass, '_.' + methodName + ': ' + message);
}

/*----------------------------------------------------------------------------*/

console.log('test.js invoked with arguments: ' + JSON.stringify(process.argv));

QUnit.module('build command checks');

(function() {
  var reHelp = /lodash --help/;

  var commands = [
    'csp',
    'exports=es',
    'exports=es6',
    'exports=npm'
  ];

  _.each(commands, function(command) {
    QUnit.test('`lodash ' + command +'` is invalid', function(assert) {
      var done = assert.async();